From 8a24441ff2cfd860a4c68d6e6c542ccbdd2cb1e5 Mon Sep 17 00:00:00 2001 From: Jon Clucas Date: Thu, 11 Jul 2024 10:28:45 -0400 Subject: [PATCH] :recycle: Pass `part_id` through to `DataPaths` --- CPAC/pipeline/engine/resource.py | 3 ++- CPAC/resources/tests/test_templates.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CPAC/pipeline/engine/resource.py b/CPAC/pipeline/engine/resource.py index 76065fb28e..d50c5cb6ba 100644 --- a/CPAC/pipeline/engine/resource.py +++ b/CPAC/pipeline/engine/resource.py @@ -332,6 +332,7 @@ def __init__( pipe_list: Optional[list] = None, *, data_paths: Optional[DataPaths | dict] = None, + part_id: Optional[str] = None, pipeline_name: str = "", wf: Optional[pe.Workflow] = None, ): @@ -339,7 +340,7 @@ def __init__( if isinstance(data_paths, dict): data_paths = DataPaths(data_paths=data_paths) elif not data_paths: - data_paths = DataPaths() + data_paths = DataPaths(part_id=part_id) self.data_paths = data_paths # pass-through for convenient access self.creds_path = self.data_paths.creds_path diff --git a/CPAC/resources/tests/test_templates.py b/CPAC/resources/tests/test_templates.py index d9f5fa9f3c..09d753a7c0 100644 --- a/CPAC/resources/tests/test_templates.py +++ b/CPAC/resources/tests/test_templates.py @@ -29,7 +29,7 @@ @pytest.mark.parametrize("pipeline", ALL_PIPELINE_CONFIGS) def test_packaged_path_exists(pipeline): """Check that all local templates are included in at least one resolution.""" - rpool = ResourcePool(cfg=Preconfiguration(pipeline), unique_id="pytest") + rpool = ResourcePool(cfg=Preconfiguration(pipeline), part_id="pytest") rpool.ingress_pipeconfig_paths() for resource in rpool.rpool.values(): node = next(iter(resource.values())).get("data")[0]