diff --git a/cmd.sh b/cmd.sh index e77002b..c9848a4 100755 --- a/cmd.sh +++ b/cmd.sh @@ -1,2 +1,2 @@ #!/bin/bash -docker run --rm ghcr.io/fnndsc/pl-lld_chxr:1.0.2 chris_plugin_info \ No newline at end of file +docker run --rm ghcr.io/fnndsc/pl-lld_chxr:1.0.3 chris_plugin_info \ No newline at end of file diff --git a/lld_chxr.py b/lld_chxr.py index 3aae7a7..c1b207e 100644 --- a/lld_chxr.py +++ b/lld_chxr.py @@ -26,7 +26,7 @@ logger.opt(colors = True) logger.add(sys.stderr, format=logger_format) -__version__ = '1.0.8' +__version__ = '1.1.0' DISPLAY_TITLE = r""" _ _ _ _ _ @@ -182,8 +182,9 @@ def analyze_measurements(data, tagStruct, unit, diff): status['exitCode'] = 4 status['flag'] = False LOG(f"{ex} not available for match.") - #return status - match = re.search(r'\d+\.\d+ \w+', measurements['Difference']).group() + + # check if the difference info contains measurements in the desired units. + match = re.search(r'\d+ \w+', measurements['Difference']).group() m_unit = match.split()[1] if m_unit != unit: status['error'].append(f"Measurement units do not match: Expected {unit}, actual {m_unit}") @@ -192,6 +193,7 @@ def analyze_measurements(data, tagStruct, unit, diff): LOG(f"Measurement units do not match: Expected {unit}, actual {m_unit}") #return status + # check if the difference info contains a float % representing limb difference. match = re.search(r'\d+\.\d+%',measurements['Difference']).group() difference = match.replace('%','') diff --git a/run-MainThread.log b/run-MainThread.log index a46aa97..c480c10 100644 --- a/run-MainThread.log +++ b/run-MainThread.log @@ -100,3 +100,44 @@ } } 2024-08-15T13:38:30.188185-04:00 END +2024-08-15T13:57:54.596903-04:00 START +2024-08-15T13:58:05.116494-04:00 +{ + "status": true, + "obj": { + "run": { + "status": true, + "stdout": { + "id": 96, + "creation_date": "2024-08-15T13:58:05.027305-04:00", + "name": "pl-lld_chxr", + "version": "1.0.3", + "dock_image": "ghcr.io/fnndsc/pl-lld_chxr:1.0.3", + "public_repo": "https://github.com/FNNDSC/pl-lld_chxr", + "icon": "", + "type": "ds", + "stars": 0, + "authors": "FNNDSC ", + "title": "A ChRIS plugin to analyze the result produced by an LLD analysis", + "category": "", + "description": "A ChRIS plugin to analyze the result produced by an LLD analysis", + "documentation": "https://github.com/FNNDSC/pl-lld_", + "license": "MIT", + "execshell": "/usr/local/bin/python", + "selfpath": "/usr/local/bin", + "selfexec": "lld_chxr", + "min_number_of_workers": 1, + "max_number_of_workers": 1, + "min_cpu_limit": 1000, + "max_cpu_limit": 2147483647, + "min_memory_limit": 100, + "max_memory_limit": 2147483647, + "min_gpu_limit": 0, + "max_gpu_limit": 0 + }, + "stderr": "", + "returncode": 0 + } + } +} +2024-08-15T13:58:05.116702-04:00 END