diff --git a/src/depiction_targeted_preproc/app_interface/collect_chunk.py b/src/depiction_targeted_preproc/app_interface/collect_chunk.py index fa67286..41f3faa 100644 --- a/src/depiction_targeted_preproc/app_interface/collect_chunk.py +++ b/src/depiction_targeted_preproc/app_interface/collect_chunk.py @@ -14,6 +14,7 @@ def collect_chunk(workunit_ref: int | Path, chunk_dir: Path) -> None: chunk_dir = chunk_dir.absolute() zip_file_path = chunk_dir / f"{chunk_dir.name}.zip" + # TODO how to incorporate the cache_file parameter here, without "assuming" that it's in the parent directory? workunit_definition = WorkunitDefinition.from_ref(workunit_ref, client=Bfabric.from_config()) workunit_id = workunit_definition.registration.workunit_id diff --git a/src/depiction_targeted_preproc/app_interface/dispatch_app.py b/src/depiction_targeted_preproc/app_interface/dispatch_app.py index c5ea358..832f807 100644 --- a/src/depiction_targeted_preproc/app_interface/dispatch_app.py +++ b/src/depiction_targeted_preproc/app_interface/dispatch_app.py @@ -34,7 +34,9 @@ def dispatch_job(self, resource: Resource, params: dict[str, Any]) -> Path: @app.default def dispatch_app(workunit_ref: int | Path, work_dir: Path) -> None: client = Bfabric.from_config() - workunit_definition = WorkunitDefinition.from_ref(workunit_ref, client) + workunit_definition = WorkunitDefinition.from_ref( + workunit_ref, client, cache_file=work_dir / "workunit_definition.yml" + ) dispatcher = DispatchApp(client=client, config=config_msi_imzml(), out_dir=work_dir) dispatcher.dispatch_workunit(definition=workunit_definition)