-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhanced shattering #129
base: main
Are you sure you want to change the base?
Enhanced shattering #129
Conversation
…d-shattering-rebase
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm except for a revision update and an FE error we might want to investigate.
}, | ||
) | ||
session.commit() | ||
result = UnShatterResult(parents=GEOIDS(geoids=data.geoids)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PP to use RETURNING
from the SQL query rather than just pass back the input data.
class ShatterResult(BaseModel): | ||
parents: GEOIDS | ||
children: list[Assignments] | ||
|
||
|
||
class UnShatterResult(BaseModel): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PP: Why double nest the result when we could just return GEOIDS
? I guess it's not a bad idea to be explicit.
@@ -163,11 +163,19 @@ class GEOIDS(BaseModel): | |||
geoids: list[str] | |||
|
|||
|
|||
class ZoneAndGEOIDS(GEOIDS): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
O: Naming? I guess this is explicit...! I would have maybe called this AssignedGEOIDS or something 🤷🏻
"""Add unshatter UDF | ||
|
||
Revision ID: 65a4fc0a727d | ||
Revises: 5ab466c5650a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
H: Need to adjust the revised migration. See recent example from the bounds work:
"""add extent to gerrydb
Revision ID: dc391733e10a
Revises: 5ab466c5650a
Create Date: 2024-10-27 19:38:13.798056
"""
from typing import Sequence, Union
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision: str = "dc391733e10a"
down_revision: Union[str, None] = "5ab466c5650a"
branch_labels: Union[str, Sequence[str], None] = None
depends_on = ("167892041d95",) # geometry col renaming
down_revision = "167892041d95"
You'll want to add the depends_on
and change the down_revision
to dc391733e10a
return map?.queryRenderedFeatures(bbox, {layers}); | ||
// if there is a child layer and parents have been shattered | ||
// check if any of the selected IDs are parents | ||
if (mapDocument?.child_layer && shatterIds.parents.size) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR works to enhance the shattering UX to support the use cases and detailed work on shattered geographies.
Description
The workflow this aims to accomplish is:
WIP screencap:
Screen.Recording.2024-10-17.at.12.25.18.PM.mov
Reviewers
Checklist
Refactor to better abstraction for going fromThere are some refactors that could be good for a future PR, but I think we should mostly leave it for now.ReturnType<queryRenderFeatures>
-> various map actionsScreenshots (if applicable):