Skip to content
Snippets Groups Projects

WS-507: More foundation-laying for ingestion manifest builder

Merged Janet Goldstein requested to merge WS-507-build-ingestion-manifest into main
1 unresolved thread
Files
9
""" The ingestion manifest """
from pathlib import Path
from .utility_classes import (
Telescope,
ScienceProduct,
)
class Parameters:
"""a manifest's various input parameters"""
def __init__(
self,
telescope: Telescope,
ingestion_path: Path,
additional_metadata: str,
collection_metadata: str,
reingest: bool = False,
ngas_ingest: bool = False,
):
self.telescope = telescope
self.ingestion_path = ingestion_path
self.additional_metadata = additional_metadata
self.collection_metadata = collection_metadata
self.reingest = reingest
self.ngas_ingest = ngas_ingest
class InputGroup:
"""
This represents the starting point for processing which generated a science product.
There is not always an input group for every output group (rawdata, for instance).
Initial assumption: Input groups consist only of science products.
"""
def __init__(self):
self.science_products = []
class IngestionManifest:
"""Represents JSON layout of ingestion information, encompassing several potential scenarios.
see ingest_envoy/test/examples, nicked from https://open-confluence.nrao.edu/x/roPCAQ
"""
def __init__(self, parameters: Parameters):
self.parameters = parameters
# to be an InputGroup
self.input_group = None
# to be an OutputGroup
self.output_group = None
# to be an AssociateGroup (not required?)
self.associate_group = None
self.science_products = []
self.ancillary_products = []
class OutputGroup:
"""Represents result of data processing"""
def __init__(self):
self.science_products = []
self.ancillary_products = []
class AssociateGroup:
"""
A representation of Science Products which are not part of the same Input or Output groups
but are still fundamentally linked. Created for RealFast project, to link the RealFast
specific execution block & image to the execution block during which a transient was
discovered.
Associate groups also, by definition, include any science product(s) within the output
group to be ingested. The new locators generated at ingestion time will be added to any
which compose an associate group in the manifest.
"""
def __init__(self):
self.science_products = []
Loading