feat(geo): baseapp.geo package — attach geometries to any object (map query with bbox/radius, plugin arch) - #445
Draft
nossila wants to merge 36 commits into
Draft
feat(geo): baseapp.geo package — attach geometries to any object (map query with bbox/radius, plugin arch)#445nossila wants to merge 36 commits into
nossila wants to merge 36 commits into
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DDeemQ7iF4D3VhAwQVui9n
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DDeemQ7iF4D3VhAwQVui9n
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DDeemQ7iF4D3VhAwQVui9n
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DDeemQ7iF4D3VhAwQVui9n
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DDeemQ7iF4D3VhAwQVui9n
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DDeemQ7iF4D3VhAwQVui9n
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DDeemQ7iF4D3VhAwQVui9n
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DDeemQ7iF4D3VhAwQVui9n
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DDeemQ7iF4D3VhAwQVui9n
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DDeemQ7iF4D3VhAwQVui9n
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DDeemQ7iF4D3VhAwQVui9n
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DDeemQ7iF4D3VhAwQVui9n
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DDeemQ7iF4D3VhAwQVui9n
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DDeemQ7iF4D3VhAwQVui9n
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DDeemQ7iF4D3VhAwQVui9n
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DDeemQ7iF4D3VhAwQVui9n
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DDeemQ7iF4D3VhAwQVui9n
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DDeemQ7iF4D3VhAwQVui9n
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DDeemQ7iF4D3VhAwQVui9n
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DDeemQ7iF4D3VhAwQVui9n
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DDeemQ7iF4D3VhAwQVui9n
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DDeemQ7iF4D3VhAwQVui9n
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DDeemQ7iF4D3VhAwQVui9n
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DDeemQ7iF4D3VhAwQVui9n
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DDeemQ7iF4D3VhAwQVui9n
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DDeemQ7iF4D3VhAwQVui9n
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DDeemQ7iF4D3VhAwQVui9n
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Mirror baseapp.files (PR #442): module path baseapp.geo, app label stays baseapp_geo so swapper settings, backend slot keys and consumer migrations are unchanged. Entry point now baseapp_geo = "baseapp.geo.plugin:GeoPlugin"; AppConfig aligned with namespace convention (BigAutoField). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DDeemQ7iF4D3VhAwQVui9n
CI runs isort via uv run with the project installed, which classifies baseapp.* as first-party; dev containers skip project install and missed the reorder. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DDeemQ7iF4D3VhAwQVui9n
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.
Summary
Adds the
baseapp.geopackage — a plugin-architecture geo feature that attaches geometries to anyDocumentId-enabled object, following the same namespace layout asbaseapp.files(#442).AbstractGeoJSONFeature(DocumentIdTargetMixin, TimeStampedModel, DocumentIdMixin, RelayModel) withname/description(optional),feature_typecategory, andgeometry = GeometryField(geography=True, srid=4326)restricted to Point|Polygon (validated inclean()and the mutation form). Concrete models live in consumers; swap viaBASEAPP_GEO_GEOJSONFEATURE_MODEL.GeoJSONFeaturetype (vendored — upstreamgraphql_geojson.GeoJSONTypewas spike-tested and rejected: it swallows interface fields intopropertiesunder graphene 3, issue Using of this module makes types to be incompatible with custom interfaces flavors/django-graphql-geojson#4). Thegraphql_geojsonGeometryscalar ships with a graphene-3parse_literalshim.geoFeaturesfiltered connection (max_limit=100,totalCount) with:bbox: "minLon,minLat,maxLon,maxLat"→__intersects, antimeridian (west > east) split into two OR-ed boxesnear: "lng,lat,radiusMeters"→__dwithin(meters-correct via geography column), radius capped at 100 kmfeatureType,targetObjectId(uuid public-id and legacy base64 relay ids)ValidationError— never a silently unfiltered resultgeoFeatureCreate(Edge payload) /geoFeatureUpdate/geoFeatureDelete(deletedId+target), permission check before any write, form-validated.GeoPermissionsBackend— public read (incl. anonymous), authenticated create, change/delete via standard Django model perms. Enforced atget_node, mutations, andPermissionsInterface.hasPerm.GeoPluginentry point underbaseapp.plugins; schema composes via the plugin registry — zero schema-file edits in consumers.admin_helpers), README, testproject wiring + migrations (pgtriggers included).Package layout
Namespace layout per #442: module path is
baseapp.geo(baseapp/geo/), while the Django app label staysbaseapp_geo— so swapper settings (BASEAPP_GEO_*), theAUTHENTICATION_BACKENDSslot key, and consumer migrations are label-based and unaffected by the module path.Test plan
flake8/black/isort/makemigrations --checkcleanbbox+nearon a running server🤖 Generated with Claude Code
https://claude.ai/code/session_01DDeemQ7iF4D3VhAwQVui9n