You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
stactools is a swiss-army knife of a software library, where each operation has its own module in stactools.core, e.g. stactools.core.add_raster, stactools.core.copy, as well as a corresponding command line interface in stactools.cli. There are some commonalities in functionality that could be abstracted up into some sort of base class or utility module to reduce the amount of duplication between operations and ensure a common Python and command-line API.
One possibility is a Task class, possibly modeled after a draft implementation in cirrus-lib: https://github.com/cirrus-geo/cirrus-lib/blob/f6a6dd01d4cd647ce87c681ed53d5c15e0c44a58/src/cirrus/lib/task.py. This task class operates in a "STAC in, STAC out" model, where the input is a STAC object augmented with additional metadata to parameterize task execution. The output is a STAC object. This model provides hooks for defining what the task does, and comes "batteries included" with a CLI builder, logging, etc.
By refactoring stactools to use a Task-like base class, we could reduce code duplication, align the APIs for the myraid of functions available in the library, and make it easier for contributors to add new functionality.
The text was updated successfully, but these errors were encountered:
stactools is a swiss-army knife of a software library, where each operation has its own module in
stactools.core
, e.g.stactools.core.add_raster
,stactools.core.copy
, as well as a corresponding command line interface instactools.cli
. There are some commonalities in functionality that could be abstracted up into some sort of base class or utility module to reduce the amount of duplication between operations and ensure a common Python and command-line API.One possibility is a
Task
class, possibly modeled after a draft implementation incirrus-lib
: https://github.com/cirrus-geo/cirrus-lib/blob/f6a6dd01d4cd647ce87c681ed53d5c15e0c44a58/src/cirrus/lib/task.py. This task class operates in a "STAC in, STAC out" model, where the input is a STAC object augmented with additional metadata to parameterize task execution. The output is a STAC object. This model provides hooks for defining what the task does, and comes "batteries included" with a CLI builder, logging, etc.By refactoring stactools to use a
Task
-like base class, we could reduce code duplication, align the APIs for the myraid of functions available in the library, and make it easier for contributors to add new functionality.The text was updated successfully, but these errors were encountered: