feat: add map2loop as packages/map2loop workspace package - #302
Open
lachlangrose wants to merge 2 commits into
Open
feat: add map2loop as packages/map2loop workspace package#302lachlangrose wants to merge 2 commits into
lachlangrose wants to merge 2 commits into
Conversation
This was referenced Aug 14, 2026
Ports Loop3D/map2loop (upstream commit 078f8a6, master @ 3.3.1) into this repo as packages/map2loop, following the packages/loop_interpolation src-layout convention (Stage 2 of ROADMAP.md), for Stage 4's map2loop half. - Source moved from flat map2loop/ to src/map2loop/; test suite ported to packages/map2loop/tests/ unchanged apart from one CWD-relative fixture path fix (tests/sampler/geo_test.csv -> path relative to the test file) needed because tests now run from the monorepo root, not map2loop's own repo root. - pyproject.toml written from the loop_interpolation template (build system, classifiers, src-layout packages.find, tests extra) but keeps map2loop's own real name/version/requires-python/dependencies. - Dependency-declaration gaps fixed (imported at module level but undeclared upstream): pandas and packaging. GDAL (osgeo) is also a hard, module-level import but is deliberately left undeclared, matching upstream's own convention of treating it as an externally-provisioned (conda/system) dependency rather than a pip one -- their own dependencies.txt explicitly skips it in check_all_dependencies(), and pip-building it from source fails without system libgdal headers. - dependencies.txt (consulted at runtime by map2loop's own import-time version-compatibility self-check) copied to src/dependencies.txt to match the relative path the existing code resolves it from, and pytest removed from it since map2loop's own self-check otherwise hard-requires pytest to be installed for a plain (non-tests-extra) install to import successfully. Verified in an isolated uv venv: `import map2loop` succeeds, and `pytest packages/map2loop/tests` gives 78 passed, 4 failed, 1 skipped, 1 collection error -- all 5 non-passing outcomes trace back to the absence of native GDAL bindings in this pip/Windows-only verification environment (4 of them) or a monorepo-embedding artifact where one test's internal `pytest.main()` call with no explicit path picks up this repo's own unrelated tests/conftest.py pytest_plugins (1 of them), not to the port itself. Audited for loop_common type reuse per ROADMAP.md Stage 4: no swap made. map2loop's bounding_box is a plain dict of map-CRS extents threaded through dozens of call sites, architecturally unrelated to loop_common.geometry.BoundingBox's local/global mesh-frame transform model; its own map2loop.logging module is already map2loop's public, already-used API surface, so routing its handful of ad-hoc print() statements through loop_common.logging would need adding loop-common as a new hard dependency for a cosmetic swap; no custom point/orientation data structures exist to compare against loop_common.observations (dip/dip direction data stays as GeoDataFrame columns throughout). No clean, low-risk win found. (cherry picked from commit fb755cc)
lachlangrose
force-pushed
the
split/03-map2loop-package
branch
from
August 14, 2026 11:14
3c7f735 to
2215803
Compare
…al in tool.uv.sources Same fix as split/02-visualisation-package: packages/* workspace glob auto-includes every package dir under packages/ as a uv workspace member, but uv separately requires each member to have a tool.uv.sources entry declaring it as workspace = true. Missing entries broke uv sync/build for every package in this repo with: "loopstructuralvisualisation is included as a workspace member, but is missing an entry in tool.uv.sources".
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.
Split out of #298 / #299. PR 3 of 9 in the stack — depends on #301.
Adds the
map2looppackage as a new self-contained workspace member underpackages/map2loop. No wiring into the root workspace config yet — that's PR 4 (next in the stack).Base is #301 only because of stack ordering; this package's content doesn't depend on the visualisation package.