Skip to content
Snippets Groups Projects

Implemented manifest generation for EB full curation in ingest_envoy

Merged Sam Kagan requested to merge teach-ingest_envoy-full-curation into 2.8.2.1-DEVELOMENT
5 unresolved threads
Files
2
@@ -327,13 +327,11 @@ class IngestionManifestBuilder:
"""
if self.curation_type == CuratorType.PARTIAL:
return self._build_partial_curation_manifest()
elif self.curation_type == CuratorType.FULL:
return self._build_full_curation_manifest()
if self.sp_type == ScienceProductType.EVLA_CAL:
return self._build_evla_cal_manifest()
elif self.sp_type == ScienceProductType.EXEC_BLOCK:
return self._build_observation_manifest()
return self._build_observation_manifest(self.curation_type == CuratorType.FULL)
return self._build_image_manifest()
@@ -414,28 +412,30 @@ class IngestionManifestBuilder:
return manifest, manifest_file
def _build_observation_manifest(self) -> (IngestionManifest, Path):
def _build_observation_manifest(self, is_full_curation: bool = False) -> tuple[IngestionManifest, Path]:
reingest_group = None
if is_full_curation:
reingest_group = self._build_reingest_group()
# create the manifest
manifest = IngestionManifest(
telescope=self.telescope,
locator=None,
sp_type=self.sp_type,
staging_source_dir=self.staging_source_dir,
reingest_group=None,
staging_source_dir=self.source_dir,
reingest_group=reingest_group,
input_group=InputGroup([]),
output_group=self._build_observation_output_group(),
filename=self.filename,
)
if not manifest.output_group.ancillary_products:
manifest.output_group.ancillary_products = []
artifacts_ap = self._build_artifacts_product()
if artifacts_ap not in manifest.output_group.ancillary_products:
manifest.output_group.ancillary_products.append(artifacts_ap)
if not manifest.output_group.ancillary_products:
manifest.output_group.ancillary_products = []
manifest_file = manifest.write()
self.write_ingestion_artifacts_tar(self.staging_source_dir / artifacts_ap.filename)
self.write_ingestion_artifacts_tar(self.source_dir / artifacts_ap.filename)
return manifest, manifest_file
Loading