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

Change include/exclude recommendations #5

Merged

Conversation

gadomski
Copy link
Member

@gadomski gadomski commented Feb 16, 2023

Related Issue(s):

Proposed Changes:

  1. Change the recommended include semantics to only return what's asked for. Previously, the recommendation was to return what was asked for AND the default fields.
  2. Include stac_version in the default fields.
  3. Clarify the wording around sub-keys.
  4. Define behavior when a field is both included and excluded.
  5. Update examples
  6. Fix some formatting in the examples

PR Checklist:

  • This PR has no breaking changes.
  • I have added my changes to the CHANGELOG or a CHANGELOG entry is not required.

@gadomski gadomski force-pushed the change-include-semantics branch 2 times, most recently from 6f95b04 to a409945 Compare February 16, 2023 16:05
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@gadomski gadomski force-pushed the change-include-semantics branch 2 times, most recently from ea43541 to db7d816 Compare February 17, 2023 17:21
@gadomski
Copy link
Member Author

@philvarner re-requesting review, I've updated all the language to use "should", and to avoid "add" and "subtract" in favor of "included" and "exclude".

Copy link
Contributor

@philvarner philvarner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

apparently I didn't submit these comments? I guess I accidentally started a review and they were all added to that. I'll delete the ones that aren't relevant.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
@philvarner
Copy link
Contributor

At the risk of getting overly conceptual here, it might be useful to state that there are multiple levels of "modeling" of data in this. The image data is a model of the real world, and likewise the STAC Item is a model of the image data. Fields is sometimes causing the STAC Item metadata to be manipulated in a way that means it's not a exact copy of what's stored in the database, but a model of that. So, for example, if we choose to return a geometry=null and bbox value to return a valid STAC Item when geometry is excluded, we're modeling the metadata to conform to the fields restrictions.

@gadomski
Copy link
Member Author

if we choose to return a geometry=null and bbox value to return a valid STAC Item when geometry is excluded, we're modeling the metadata to conform to the fields restrictions.

I guess? To me, it's simpler than that -- if someone says they don't want it, don't give it to them. IMO we can trust the client to know what it wants (i.e. a invalid STAC item).

@philvarner
Copy link
Contributor

Yeah, that's probably not something the server should try to do, since the validity guardrails are off when you start using fields.

CHANGELOG.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
Copy link
Contributor

@philvarner philvarner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comments inline. I think we're close to having this done.

README.md Outdated Show resolved Hide resolved
philvarner
philvarner previously approved these changes Mar 13, 2023
@gadomski
Copy link
Member Author

@philvarner sorry I squashed and force pushed and the repo requires a re-review, didn't realize that.

philvarner
philvarner previously approved these changes Mar 13, 2023
@philvarner philvarner merged commit ec9a58b into stac-api-extensions:main Mar 20, 2023
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