From 6cda6fdf58b19c44b04e2f9144125099fa170441 Mon Sep 17 00:00:00 2001 From: Christopher Rhodes <christopher.rhodes@embl.de> Date: Wed, 11 Dec 2024 15:36:27 +0100 Subject: [PATCH] Revert "Option to parse coordinates from filename" This reverts commit 3332573d07acdc18d18eac3bfaf8f6f2afd57206. --- model_server/clients/batch_runner.py | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/model_server/clients/batch_runner.py b/model_server/clients/batch_runner.py index 6492726e..91fac94a 100644 --- a/model_server/clients/batch_runner.py +++ b/model_server/clients/batch_runner.py @@ -1,7 +1,6 @@ from collections import OrderedDict import json from pathlib import Path -import re import shutil import pandas as pd @@ -143,17 +142,11 @@ class FileBatchRunnerClient(HttpClient): where_remote = Path(self.remote_paths['input']) / inp['directory'] def _get_file_info(filename): - info = { + return { 'remote_path': (where_remote / filename).as_posix(), 'local_path': where_local / filename, 'is_multiposition': is_multiposition, } - if (coord_regex := inp.get('coord_regex')) is not None: - for coord_k, coord_v in re.search(coord_regex, filename).groupdict().items(): - if coord_k.lower() not in ['well', 'position', 'time']: - raise InvalidStackCoordinateKeyError(f'Cannot interpret coordinate {coord_k}') - info[f'coord_{coord_k.lower()}'] = int(coord_v) - return info paths = paths + [_get_file_info(f) for f in files] if max_count is not None: df = pd.DataFrame(paths).head(min(max_count, len(paths))) @@ -276,7 +269,4 @@ class WatchPathVerificationError(Error): pass class TasksRemainingError(Error): - pass - -class InvalidStackCoordinateKeyError(Error): pass \ No newline at end of file -- GitLab