Skip to content
Snippets Groups Projects

ingestion manifest creation for EVLA CAL ingestion only

Merged Daniel Lyons requested to merge WS-507-evla-cal-ingestion-manifest into main
3 files
+ 5
24
Compare changes
  • Side-by-side
  • Inline
Files
3
""" The entrypoint (to be renamed from "main" at some point"""
import sys
from pathlib import Path
from ingest_envoy.ingestion_manifest import IngestionManifest
from ingest_envoy.utilities import ScienceProductType
def main():
"""
Takes a single command-line parameter: spool directory containing files to be ingested.
:return:
"""
# parser handles command-line args; no validation needed here
staging_dir, ingestion_type, locator = sys.argv[1], sys.argv[2], sys.argv[3]
# nor here
source_dir = Path(staging_dir)
# ValueError will be thrown if ingestion_type isn't a known ScienceProductType
ingestion_type = ScienceProductType.from_str(ingestion_type)
# Launch the manifest builder
IngestionManifest(source_dir, ingestion_type, locator).create()
Loading