Skip to content

Key Concepts

Amy Boyer edited this page Aug 23, 2019 · 6 revisions

The API

In the /theia folder is a Django app that encapsulates access to the configuration objects and allows the creation of imagery requests. It doesn't do any actual work by itself, instead pushing it into a Celery queue for a worker instance to process. The API can be accessed at http://localhost:8080/api

Domain Model

The domain model of the Django app specifies the objects for creating pipeline configurations, as well as objects to track the processing of a particular request.

Adapters

Adapters encapsulate the acquisition of imagery from a particular provider. They are responsible for receiving an ImageryRequest and producing one or more JobBundle objects for subsequent processing.

Operations

Each discrete operation on a JobBundle is represented by an operation. Operations implement the AbstractOperation class.

Tasks

Celery tasks are specified in files named tasks.py. Tasks that will likely be shared by all adapters are placed in /theia/tasks.py, while tasks specific to a given adapter (like USGS' task wait_for_scene) can be specified from within that adapter's code.

  • Shared Tasks

    • theia.tasks.locate_scenes - Invoke an adapter to find scenes to be processed by the bundle
    • theia.tasks.process_bundle - Given a JobBundle representing a single scene to be processed, invoke the adapter to retrieve the files, unarchive them, and push them through the pipeline's PipelineStage
  • USGS Tasks

    • theia.adapters.usgs.tasks.wait_for_scene - Check to see if a requested scene has been processed by USGS and is ready for download

Tests

The test suite is in this folder and can be invoked by pipenv run tests