stactools icon indicating copy to clipboard operation
stactools copied to clipboard

Document the procedure for adding a new package

Open gadomski opened this issue 4 years ago • 6 comments

As initially mentioned in #134, we don't have documentation/procedures for adding a new core package. These documents should be developed and included in the readthedocs. They should outline:

  • How to stand up a new stactools package (i.e. "clone the template repo into your own user/organization, change the names, etc")
  • Expectations for testing, etc
  • How to request inclusion as a core package
  • The acceptance criteria for a core package (public dataset, possibly usable to people outside of the developing organization, suitability for STAC, etc)
  • How to migrate the repo from the user to https://github.com/stactools-packages
  • Expectations for keeping core packages up-to-date, passing CI, etc
  • Deprecation/removal procedures (no longer maintained, etc)

gadomski avatar Jun 17 '21 14:06 gadomski

Another thing that should be on the list is a screenshot or served instance of pip install stactools-browse && stac browse /my/example/catalog.json to demonstrate what the proposed dataset's catalog looks like.

gadomski avatar Jun 17 '21 21:06 gadomski

@gadomski seems important to document that stactools is using "native namespace packages" https://packaging.python.org/en/latest/guides/packaging-namespace-packages/#native-namespace-packages (yes?). If a new plugin package failed to omit stactools/__init__.py then the entire namespace in that installation could be broken.

sgillies avatar Jan 12 '22 20:01 sgillies

So we have it in the README and as a part of the stactools package template, but you're right that its not immediately obvious.

I haven't looked into it at all, but do you know of a library way of checking for that offending stactools/__init__.py file and throwing a clear exception (e.g. "Stactools package stactools.foo breaks namespace packaging by including an __init__.py. Please uninstall stactools-foo" or whatever). It could be nice to be defensive programmatically.

gadomski avatar Jan 12 '22 21:01 gadomski

In the past I've used custom pre-commit scripts. So you could have a simple Python script that just iterates over each package and raises an error if stactools/__init__.py exists.

kylebarron avatar Jan 12 '22 21:01 kylebarron

I was thinking more from the stac-utils/stactools perspective -- like is there a hook I can put in the plugin mechanism to detect a bad stactools package install?

gadomski avatar Jan 12 '22 21:01 gadomski

@gadomski I don't think so, doesn't the offending file corrupt module importing?

sgillies avatar Jan 13 '22 01:01 sgillies