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

Comments on results from running stac-check #93

Open
philvarner opened this issue Oct 20, 2022 · 4 comments
Open

Comments on results from running stac-check #93

philvarner opened this issue Oct 20, 2022 · 4 comments

Comments

@philvarner
Copy link
Collaborator

I ran stac-check against https://planetarycomputer.microsoft.com/api/stac/v1/collections/sentinel-2-l2a/items/S2B_MSIL2A_20221020T014659_R017_T56WPE_20221020T075412 and have a few comments about the results:

  • Item name 'S2B_MSIL2A_20221020T014659_R017_T56WPE_20221020T075412' should only contain Searchable identifiers

This is the id field. I don't think the Searchable Identifiers recommendation should apply to this.

  • Identifiers should consist of only lowercase characters, numbers, '_', and '-'", '', '

I don't think this should apply to ID. In this case, it's using the ID provided by ESA/Singergize, and it actually creates problems when changing the case of it to conform to this.

  • You have 33 properties. Please consider using links to avoid bloated metadata

I don't think 33 is a lot, and I'm not sure how I would use links to avoid this, since I likely want to allow searching over many of these fields.

@jonhealy1
Copy link
Collaborator

jonhealy1 commented Nov 26, 2022

Hi. These are suggestions. They are not validation errors. We do have a config file where you can turn off these messages: https://github.com/stac-utils/stac-check/blob/main/stac_check/stac-check.config.yml You can increase the defaults for the bloated messages warning here:

settings:
  # number of links before the bloated links warning is shown
  max_links: 20
  # number of properties before the bloated metadata warning is shown
  max_properties: 20

@jonhealy1
Copy link
Collaborator

jonhealy1 commented Nov 26, 2022

@philvarner What is your suggestion for a more reasonable default for bloated metadata? Also what is a searchable identifier by your definition? Thanks.

@philvarner
Copy link
Collaborator Author

I didn't know about the config file, that's useful -- that should probably be added to the README as a way to configure it.

For searchable identifier, I think allowing uppercase letters is also reasonable, particularly because there are so many cases where the IDs are generated from some other system that may not be as restrictive.

I don't know if there is a more reasonable default for bloated metadata -- I really don't think this should be a check at all. Presumably, these fields have been added because they're useful metadata on the Item. The only alternative seems to be to not put as much metadata in, but we often encourage implementers to put as much metadata about the Items as possible, because there are a lot of use cases that are not yet defined, and someone could find it useful for those.

@jonhealy1
Copy link
Collaborator

jonhealy1 commented Nov 29, 2022

This project was commissioned to reflect the advice given in the STAC Best Practices document: https://github.com/radiantearth/stac-spec/blob/master/best-practices.md I may not have understood many things here correctly.

This is where the bloated metadata idea came from: https://github.com/radiantearth/stac-spec/blob/master/best-practices.md#field-selection-and-metadata-linking

With the Item ids I think you're right and as long as they don't contain the ':' or '/' characters there is no problem.

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

No branches or pull requests

2 participants