small fixes 2026-08-08: use mortie's flat exports instead of the tools submodule (issue #406) - #411
Merged
Merged
Conversation
Member
Author
|
🤖 from Claude All six |
4 tasks
espg
marked this pull request as ready for review
August 8, 2026 17:47
This was referenced Aug 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #406.
Mechanical import swap, zero behaviour change: every remaining consumer of the
mortie.toolssubmodule path moves to mortie's flat export.Why this PR exists rather than PR #398
#406 was already implemented as
ae408eaon PR #398's branch(
claude/small-fixes-2026-08-05), but that PR cannot carry the fix to merge, fortwo independent reasons:
sub-second windowing epoch), whose design is now bound up with Per-centroid temporal companion for t-digests: a 64-bit hierarchical time cell, mirroring the spatial location companion #410
(temporal/timespan representation). That will not be settled soon. Use mortie's flat exports instead of the mortie.tools submodule path (6 sites) #406 is an
unrelated mechanical import fix and should not sit behind a temporal-design
decision.
at
196867b, before PR land the AOI/CONUS shardmap builders (issue #372) #395 ("land the AOI/CONUS shardmap builders",issue conus shardmap builder mislabels the considered count as intersecting #372) merged on 2026-08-07 and added
data/to the repo. Those fileswere never in its tree, so
git ls-files dataon that branch is genuinelyempty — which is exactly how the first correction comment on Use mortie's flat exports instead of the mortie.tools submodule path (6 sites) #406 came to
report the
data/scripts as untracked.This PR is cut from a
main(4edbf0ee) that contains #395, so it can see allsix. It carries
ae408eaforward by cherry-pick (authorship preserved) and addsthe two
data/sites on top.Why it matters
mortie.toolsis not an advertised submodule — onlyarrowandmorton_indexare. espg/mortie#159 (PR espg/mortie#169) moves
mort2polygonandmort2geointo
mortie/convert.py, and that PR cannot merge until all six sites here areclear. The PR #169 review independently surfaced the same six
(r3740911256).
Both names are flat exports on every mortie version that has the function, so
there is no floor bump here —
mortie>=0.7.2inpyproject.tomlis unchanged.Sites
src/zagg/grids/healpix.pyshards_bbox)mort2polygone31070c(cherry-pick)src/zagg/grids/healpix.pyshard_footprint)mort2polygone31070c(cherry-pick)demo/05_california_read.ipynbmort2polygone31070c(cherry-pick)notebooks/aoi_mask.ipynbmort2geoe31070c(cherry-pick)data/build_aoi_shardmap.py_leak_check)mort2polygona49832cdata/conus/build_conus_shardmap.py_leak_check)mort2polygona49832cNote the notebook site is
mort2geo, notmort2polygon— #159 moves the twonames independently, so both had to be swept.
data/conus/plot_conus_shardmap.pyappears in this issue's original site listbut is not tracked on
main(it exists only as an untracked local file), soit is out of scope here.
Phases
ae408ea— the four sites PR small fixes 2026-08-05: refuse a sub-second windowing epoch (issue #390) #398 can see (e31070c)data/sites PR small fixes 2026-08-05: refuse a sub-second windowing epoch (issue #390) #398's fork point put out of reach (a49832c)How it was tested
Acceptance —
git grep -n "mortie\.tools\|from mortie import tools"over thewhole worktree returns nothing.
Both names are object-identical across the two paths, which is what makes
this a no-op (mortie 0.9.4):
Test coverage is uneven, and worth stating plainly:
src/zagg/grids/healpix.pysites are covered —shards_bboxandshard_footprintare both exercised bytests/, sopytestgenuinelyexecutes that half of the change.
data/scripts and the two notebooks are not covered by the testsuite at all. That is precisely why nothing in zagg's CI would have caught the
Split tools.py and geometry.py into domain modules mirroring the Rust tree espg/mortie#159 break.
So rather than imply the suite exercises the
data/change, both scripts wereimported by path and their
_leak_check— the one function carrying the changedimport — was called on real order-9 morton keys over CONUS. On the happy path
_leak_checknever touchesgrid, so this runs standalone:Cell centres land on the input points, so the swapped import resolves and
mort2polygonreturns correct geometry through it.Gates (
uv run):ruff check src testsN818atsrc/zagg/registry.py:64ruff format --check src teststests/data/benchmark/README.mdpytest -qtest_lambda_build.py::TestFunctionBuild::test_function_build_succeedsAll three failures are pre-existing on
4edbf0eeand unrelated to this diff;flagged, not fixed, per CLAUDE.md §4. The flaky
test_client_transport.pypollertest passed on both runs.
Questions for review
it is not this run's call. Once this merges,
ae408eathere becomes a no-opand PR small fixes 2026-08-05: refuse a sub-second windowing epoch (issue #390) #398's diff for those four files should drop out on rebase. A note to
that effect is on its thread.
claude/small-fixes-2026-08-08(the date this ran); the earliersmall-fix bundle is
claude/small-fixes-2026-08-05.