gedih3.doctor.upstream#
Upstream NASA CMR check + backfill/build recommendation engine.
Triggered by the --online flag. Queries NASA CMR (via the existing
gedih3.daac.GEDIAccessor) for each product the database tracks, in
the database’s own spatial/temporal extent, and classifies each gap into one
of five buckets:
BACKFILL_LOCAL: granule indexed in DB; missing product file is on disk
BACKFILL_REMOTE: granule indexed; missing file on NASA, not local
BACKFILL_UNAVAIL: granule indexed; NASA does not list the missing product
BUILD_NEW: granule available on NASA in DB extent; not indexed
OUT_OF_SCOPE: granule available on NASA outside DB extent
The classifier maps each bucket to a concrete CLI command the user can run. The doctor never executes these commands.
Attributes#
Classes#
Summary of NASA-side granule availability vs database state. |
Functions#
|
For each product, query NASA CMR and return granule keys. |
|
Run the upstream check and produce an |
Module Contents#
- gedih3.doctor.upstream.GranuleKey#
- class gedih3.doctor.upstream.UpstreamReport[source]#
Summary of NASA-side granule availability vs database state.
- available_per_product: Dict[str, Set[GranuleKey]]#
- db_granule_keys: Set[GranuleKey]#
- db_per_product: Dict[str, Set[GranuleKey]]#
- classifications: Dict[str, List[Tuple[GranuleKey, str]]]#
- gedih3.doctor.upstream.query_available_granules(spatial, temporal, products: List[str], version=None, logger=None) Dict[str, Set[GranuleKey]][source]#
For each product, query NASA CMR and return granule keys.
- gedih3.doctor.upstream.gather_upstream(ctx, logger=None) UpstreamReport[source]#
Run the upstream check and produce an
UpstreamReport.Reads the DB extent from the build log. Computes per-product availability on NASA, the per-product on-disk presence, and the per-product DB presence, then classifies and emits recommendations.