stactools
stactools copied to clipboard
Summaries
Related Issue(s): Implements #45 for collections
Description:
stac summary now prints summaries that already exist in the JSON, or can generate them for the default fields if they are missing or with the -f, --force_resummary flag. The collection.json is left unchanged; new summaries are only output to the console.
Generating or displaying summaries for specified fields only has not been implemented.
Because summaries are no longer supported for catalogs, it suggests running stac describe -h CATALOG_HREF if a catalog is given as input.
PR checklist:
- [x] Code is formatted (run
scripts/format). - [x] Code lints properly (run
scripts/lint). - [x] Tests pass (run
scripts/test). - [x] Documentation has been updated to reflect changes, if applicable.
- [ ] Changes are added to the CHANGELOG.
I'm having trouble with the tests, and I'm not sure why. They complete successfully when I checkout main.
______________________________________________________________ ERROR collecting tests/cli/commands/test_add_raster.py _______________________________________________________________
ImportError while importing test module '/Users/jrush/projects/stactools/tests/cli/commands/test_add_raster.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
../../opt/miniconda3/lib/python3.9/importlib/__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/cli/commands/test_add_raster.py:6: in <module>
from stactools.cli.commands.add_raster import create_add_raster_command
E ModuleNotFoundError: No module named 'stactools.cli.commands.add_raster'
_________________________________________________________________ ERROR collecting tests/core/utils/test_convert.py _________________________________________________________________
ImportError while importing test module '/Users/jrush/projects/stactools/tests/core/utils/test_convert.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
../../opt/miniconda3/lib/python3.9/importlib/__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/core/utils/test_convert.py:8: in <module>
from stactools.core.utils.convert import cogify, cogify_subdatasets
E ImportError: cannot import name 'cogify_subdatasets' from 'stactools.core.utils.convert' (/Users/jrush/projects/stactools/venv/lib/python3.9/site-packages/stactools/core/utils/convert.py)