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

Add entry point group for loading read_href_modifier from the command line #377

Open
TomAugspurger opened this issue Dec 6, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@TomAugspurger
Copy link
Collaborator

Is your feature request related to a problem? Please describe.

To facilitate creating STAC items from URLs that require a read_href_modifier, I'd like to use something like

stac modis create-item https://modiseuwest.blob.core.windows.net/modis-061/MYD11A1/00/08/2002200/MYD11A1.A2002200.h00v08.061.2020128174536.hdf.xm --read-href-modifier=stactools.planetary_computer:sign

Describe the solution you'd like

I think we can do this with Entry Points. stactools would add a group, and various packages (like planetary-computer) could register entrypoints. The change required in stactools packages would be for the CLI to load the user-provided argument as an entrypoint using importlib.metatdata.

Describe alternatives you've considered

Additional context
Add any other context or screenshots about the feature request here.

@TomAugspurger TomAugspurger added the enhancement New feature or request label Dec 6, 2022
@gadomski
Copy link
Member

gadomski commented Dec 6, 2022

I'm unsure how this would propagate down to the dataset packages (e.g. stactools-modis). Dataset subpackages aren't required (and don't always) use any stactools functionality -- they often roll their own create_item functions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants