Skip to content
Snippets Groups Projects

fix manifest booleans

Merged Charlotte Hausman requested to merge fix-manifest-booleans into main
4 files
+ 54
43
Compare changes
  • Side-by-side
  • Inline
Files
4
@@ -162,7 +162,7 @@ class IngestionManifest(ManifestComponentIF):
:return:
"""
me_dict = self.to_json()
me_dict = self.to_dict()
output_path = self.staging_source_dir / MANIFEST_FILENAME
to_write = json.dumps(me_dict, indent=4)
@@ -171,9 +171,9 @@ class IngestionManifest(ManifestComponentIF):
return output_path
def to_json(self) -> JSON:
def to_dict(self) -> JSON:
"""
Turn this object into a JSON string suitable for writing to a file
Turn this maifest into a Dictionary suitable for converting to JSON
:return:
"""
@@ -181,15 +181,15 @@ class IngestionManifest(ManifestComponentIF):
me_dict = dict(self.__dict__)
to_return = {
IngestionManifestKey.PARAMETERS.value: self.parameters.to_json(),
IngestionManifestKey.OUTPUT_GROUP.value: me_dict[IngestionManifestKey.OUTPUT_GROUP.value].to_json(),
IngestionManifestKey.PARAMETERS.value: self.parameters.to_dict(),
IngestionManifestKey.OUTPUT_GROUP.value: me_dict[IngestionManifestKey.OUTPUT_GROUP.value].to_dict(),
}
# Ingestion manifests with empty input groups can cause errors on ingest
if len(self.input_group.science_products) > 0:
to_return[IngestionManifestKey.INPUT_GROUP.value] = me_dict[
IngestionManifestKey.INPUT_GROUP.value
].to_json()
].to_dict()
return to_return
@@ -227,7 +227,6 @@ class IngestionManifestBuilder:
ScienceProductType.VLASS_SECI,
ScienceProductType.EXEC_BLOCK,
]:
raise NotImplementedError(f"Don't know yet how to build a {self.sp_type.value} manifest")
if locator is not None:
Loading