Skip to content
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

Ensure special keys are not in content when loaded #112

Merged
merged 2 commits into from
May 13, 2022

Conversation

mmcfarland
Copy link
Collaborator

The loader pop'd keys like collection off the item, then dehydrated the
item to be used as the 'content'. With collection removed prior to
dehydration, it was flagged with the "do-not-merge" marker because the
key is on the base_item. Instead, ensure that id, collection, and
geometry are not in content as they are stored on the table row and
shouldn't participate in hydration.

Additionally, bbox was previously a derived value at search runtime but
was recently changed to a returned value if it existed on the item.
However, during loading, the bbox was dropped so would never exist on
the persisted item.

The loader pop'd keys like collection off the item, then dehydrated the
item to be used as the 'content'. With collection removed prior to
dehydration, it was flagged with the "do-not-merge" marker because the
key is on the base_item. Instead, ensure that id, collection, and
geometry are not in content as they are stored on the table row and
shouldn't participate in hydration.

Additionally, bbox was previously a derived value at search runtime but
was recently changed to a returned value if it existed on the item.
However, during loading, the bbox was dropped so would never exist on
the persisted item.
@mmcfarland
Copy link
Collaborator Author

cc @lossyrob @bitner

pypgstac/pypgstac/load.py Outdated Show resolved Hide resolved
@lossyrob lossyrob merged commit b06cdc6 into main May 13, 2022
@lossyrob lossyrob deleted the fix/mjm/loader-removes-keys branch May 13, 2022 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants