WS-601: ancillary products are now added to EVLA CAL manifest
5 unresolved threads
5 unresolved threads
-
bug fix: ancillary products are now added to EVLA CAL manifest -
kludges repaired
TODO next MR:
-
yet more fixing of broken tests and implementation of TODO tests
Edited by Janet Goldstein
Merge request reports
Activity
118 118 additional_metadata: AbstractTextFile = None, 119 119 ): 120 120 self.telescope = telescope 121 self.reingest = reingest 122 self.ngas_ingest = ngas_ingest 123 self.calibrate = calibrate 121 122 # TODO this is kludgy; find a way to do this elegantly (or, better yet, not at all) 123 if isinstance(reingest, bool): 124 self.reingest = reingest 125 else: 126 self.reingest = True if self.reingest else False changed this line in version 2 of the diff
119 119 ): 120 120 self.telescope = telescope 121 self.reingest = reingest 122 self.ngas_ingest = ngas_ingest 123 self.calibrate = calibrate 121 122 # TODO this is kludgy; find a way to do this elegantly (or, better yet, not at all) 123 if isinstance(reingest, bool): 124 self.reingest = reingest 125 else: 126 self.reingest = True if self.reingest else False 127 128 if isinstance(ngas_ingest, bool): 129 self.ngas_ingest = ngas_ingest 130 else: 131 self.ngas_ingest = True if self.ngas_ingest else False changed this line in version 2 of the diff
121 122 # TODO this is kludgy; find a way to do this elegantly (or, better yet, not at all) 123 if isinstance(reingest, bool): 124 self.reingest = reingest 125 else: 126 self.reingest = True if self.reingest else False 127 128 if isinstance(ngas_ingest, bool): 129 self.ngas_ingest = ngas_ingest 130 else: 131 self.ngas_ingest = True if self.ngas_ingest else False 132 133 if isinstance(calibrate, bool): 134 self.calibrate = calibrate 135 else: 136 self.calibrate = True if self.calibrate else False changed this line in version 2 of the diff
187 188 input_group=self._build_input_group(), 188 189 output_group=self._build_evla_cal_output_group(), 189 190 ) 190 manifest_file = manifest.write() 191 191 artifacts_tar = self.write_ingestion_artifacts_tar() 192 192 artifacts_ap = AncillaryProduct( 193 193 AncillaryProductType.INGESTION_ARTIFACTS, filename=artifacts_tar.name 194 194 ) 195 195 196 manifest.output_group.ancillary_products = [artifacts_ap] 196 if not manifest.output_group.ancillary_products: 197 manifest.output_group.ancillary_products = [] 198 weblog = self.staging_source_dir / WEBLOG_FILENAME 199 if not weblog.exists(): 200 weblog.touch() changed this line in version 2 of the diff
286 296 :return: a .tar archive of the ingestion artifacts 287 297 """ 288 298 289 manifest_file = find_manifest(self.staging_source_dir) 290 299 ing_tar = self.staging_source_dir / self.build_artifacts_filename() 291 300 with tarfile.open(ing_tar, "w") as ingestion_artifacts_tar: 292 301 for file in self.files_found: 293 302 if self.sp_type == ScienceProductType.IMAGE: 294 303 ingestion_artifacts_tar.add(file) 295 304 296 # include the manifest 297 ingestion_artifacts_tar.add(manifest_file) 305 # include the manifest, which won't exist quite yet; make a dummy 306 mf_file = self.staging_source_dir / MANIFEST_FILENAME 307 if not mf_file.exists(): 308 mf_file.touch() Per consultation with @jsheckar, the manifest is considered an ingestion artifact.
changed this line in version 2 of the diff
added 1 commit
- 040b1bde - WS-601: Removed unnecessary kludges in manifest and ingestion artifacts creation.
Please register or sign in to reply