Skip to content
Snippets Groups Projects
Commit 68a0e6a1 authored by Brittany Faciane's avatar Brittany Faciane
Browse files

WS-1520: Add the GBT template to Deliver.

parent c94105bd
No related branches found
No related tags found
1 merge request!1207WS-1520: Add the GBT template to Deliver.
Pipeline #8293 passed
Pipeline: workspaces

#8294

    ......@@ -50,6 +50,7 @@ class ProductMetadata(ProductMetadataIF):
    "ALMA": "$DELIVERY_ROOT/$PROJECT_CODE/$MOUS_ID/$PIPELINE_SPEC/$PRODUCT",
    "VLBA": "$DELIVERY_ROOT/$PROJECT_CODE/$SEGMENT/$PRODUCT",
    "GMVA": "$DELIVERY_ROOT/$PROJECT_CODE/$SEGMENT/$PRODUCT",
    "GBT": "$DELIVERY_ROOT/$PROJECT_CODE/$PROJECT_CODE_$SEGMENT/raw/$PRODUCT",
    }
    def __init__(self, telescope: str, project_code: str, type: str, segment: str, mous_id: str, date: str):
    ......@@ -90,7 +91,7 @@ class ProductMetadata(ProductMetadataIF):
    template = template.replace("$DELIVERY_ROOT/", "")
    # second, replace $FOO with {foo}
    return re.sub(r"\$([^/]+)", lambda match: "{{" + match.group(1).lower() + "}}", template)
    return re.sub(r"\$([A-Z_]+[A-Z])", lambda match: "{{" + match.group(1).lower() + "}}", template)
    @property
    def pipeline_spec(self) -> str:
    ......
    ......@@ -38,7 +38,7 @@ def test_delivery_directory_improvements(resource_path_root):
    # the plan here is basically to iterate the list of items in the product_metadata directory
    # and generate each path we want for these and verify them.
    expected = {
    "99509886-dad3-4036-8fff-dfa0535303fb.json": "AGBT14A_110/observation.56677.52671296289/",
    "99509886-dad3-4036-8fff-dfa0535303fb.json": "AGBT14A_110/AGBT14A_110_1234/raw/",
    "cb1ed0a0-3f9d-4abf-84a2-e39dd983adbb.json": "22A-068/imaging_pipeline.0.0/",
    "51f73863-7e54-42a7-a5d1-9c86073b4910.json": "2018.1.01140.S/uid___A001_X133d_X3b22/imaging_pipeline.0.0/",
    "8cf62cf1-3d5d-454f-b356-16d902566251.json": "NAPI/observation.43904.5231713/",
    ......
    ......@@ -2,7 +2,7 @@
    "telescope": "GBT",
    "project_code": "AGBT14A_110",
    "type": "execblock",
    "segment": null,
    "segment": "1234",
    "mous_id": null,
    "date": "56677.52671296289"
    }
    \ No newline at end of file
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment