From e94464d6f4ebe3492c41b688f9d3f12d93dd5cbb Mon Sep 17 00:00:00 2001 From: Leonid Kostrykin Date: Mon, 30 Sep 2024 11:50:33 +0200 Subject: [PATCH 1/9] Move /tools/curl_post to /deprecated/tools/curl_post --- {tools => deprecated/tools}/curl_post/.shed.yml | 0 {tools => deprecated/tools}/curl_post/curl_post.xml | 0 .../tools}/curl_post/test-data/curl.txt | 0 .../tools}/curl_post/test-data/sample_seg.tif | Bin 4 files changed, 0 insertions(+), 0 deletions(-) rename {tools => deprecated/tools}/curl_post/.shed.yml (100%) rename {tools => deprecated/tools}/curl_post/curl_post.xml (100%) rename {tools => deprecated/tools}/curl_post/test-data/curl.txt (100%) rename {tools => deprecated/tools}/curl_post/test-data/sample_seg.tif (100%) diff --git a/tools/curl_post/.shed.yml b/deprecated/tools/curl_post/.shed.yml similarity index 100% rename from tools/curl_post/.shed.yml rename to deprecated/tools/curl_post/.shed.yml diff --git a/tools/curl_post/curl_post.xml b/deprecated/tools/curl_post/curl_post.xml similarity index 100% rename from tools/curl_post/curl_post.xml rename to deprecated/tools/curl_post/curl_post.xml diff --git a/tools/curl_post/test-data/curl.txt b/deprecated/tools/curl_post/test-data/curl.txt similarity index 100% rename from tools/curl_post/test-data/curl.txt rename to deprecated/tools/curl_post/test-data/curl.txt diff --git a/tools/curl_post/test-data/sample_seg.tif b/deprecated/tools/curl_post/test-data/sample_seg.tif similarity index 100% rename from tools/curl_post/test-data/sample_seg.tif rename to deprecated/tools/curl_post/test-data/sample_seg.tif From 5a8769da0c23a81d40b29918b49683337fadf354 Mon Sep 17 00:00:00 2001 From: Leonid Kostrykin Date: Mon, 30 Sep 2024 11:51:35 +0200 Subject: [PATCH 2/9] Move /tools/points2binaryimage to /deprecated/tools/points2binaryimage --- .../tools}/points2binaryimage/.shed.yml | 0 .../tools}/points2binaryimage/creators.xml | 0 .../tools}/points2binaryimage/points2binaryimage.py | 0 .../points2binaryimage/points2binaryimage.xml | 0 .../tools}/points2binaryimage/test-data/input1.tsv | 0 .../tools}/points2binaryimage/test-data/input2.tsv | 0 .../tools}/points2binaryimage/test-data/output1.tif | Bin .../tools}/points2binaryimage/test-data/output2.tif | Bin .../tools}/points2binaryimage/tests.xml | 0 9 files changed, 0 insertions(+), 0 deletions(-) rename {tools => deprecated/tools}/points2binaryimage/.shed.yml (100%) rename {tools => deprecated/tools}/points2binaryimage/creators.xml (100%) rename {tools => deprecated/tools}/points2binaryimage/points2binaryimage.py (100%) rename {tools => deprecated/tools}/points2binaryimage/points2binaryimage.xml (100%) rename {tools => deprecated/tools}/points2binaryimage/test-data/input1.tsv (100%) rename {tools => deprecated/tools}/points2binaryimage/test-data/input2.tsv (100%) rename {tools => deprecated/tools}/points2binaryimage/test-data/output1.tif (100%) rename {tools => deprecated/tools}/points2binaryimage/test-data/output2.tif (100%) rename {tools => deprecated/tools}/points2binaryimage/tests.xml (100%) diff --git a/tools/points2binaryimage/.shed.yml b/deprecated/tools/points2binaryimage/.shed.yml similarity index 100% rename from tools/points2binaryimage/.shed.yml rename to deprecated/tools/points2binaryimage/.shed.yml diff --git a/tools/points2binaryimage/creators.xml b/deprecated/tools/points2binaryimage/creators.xml similarity index 100% rename from tools/points2binaryimage/creators.xml rename to deprecated/tools/points2binaryimage/creators.xml diff --git a/tools/points2binaryimage/points2binaryimage.py b/deprecated/tools/points2binaryimage/points2binaryimage.py similarity index 100% rename from tools/points2binaryimage/points2binaryimage.py rename to deprecated/tools/points2binaryimage/points2binaryimage.py diff --git a/tools/points2binaryimage/points2binaryimage.xml b/deprecated/tools/points2binaryimage/points2binaryimage.xml similarity index 100% rename from tools/points2binaryimage/points2binaryimage.xml rename to deprecated/tools/points2binaryimage/points2binaryimage.xml diff --git a/tools/points2binaryimage/test-data/input1.tsv b/deprecated/tools/points2binaryimage/test-data/input1.tsv similarity index 100% rename from tools/points2binaryimage/test-data/input1.tsv rename to deprecated/tools/points2binaryimage/test-data/input1.tsv diff --git a/tools/points2binaryimage/test-data/input2.tsv b/deprecated/tools/points2binaryimage/test-data/input2.tsv similarity index 100% rename from tools/points2binaryimage/test-data/input2.tsv rename to deprecated/tools/points2binaryimage/test-data/input2.tsv diff --git a/tools/points2binaryimage/test-data/output1.tif b/deprecated/tools/points2binaryimage/test-data/output1.tif similarity index 100% rename from tools/points2binaryimage/test-data/output1.tif rename to deprecated/tools/points2binaryimage/test-data/output1.tif diff --git a/tools/points2binaryimage/test-data/output2.tif b/deprecated/tools/points2binaryimage/test-data/output2.tif similarity index 100% rename from tools/points2binaryimage/test-data/output2.tif rename to deprecated/tools/points2binaryimage/test-data/output2.tif diff --git a/tools/points2binaryimage/tests.xml b/deprecated/tools/points2binaryimage/tests.xml similarity index 100% rename from tools/points2binaryimage/tests.xml rename to deprecated/tools/points2binaryimage/tests.xml From 266bc984c7d1f96a783592aec229e9250c0ac492 Mon Sep 17 00:00:00 2001 From: Leonid Kostrykin Date: Mon, 30 Sep 2024 12:05:01 +0200 Subject: [PATCH 3/9] Move /tools/color-deconvolution to /tools/color_deconvolution --- .../.shed.yml | 0 .../color-deconvolution.xml | 0 .../color_deconvolution.py | 0 .../test-data/galaxyIcon_noText.png | Bin 4 files changed, 0 insertions(+), 0 deletions(-) rename tools/{color-deconvolution => color_deconvolution}/.shed.yml (100%) rename tools/{color-deconvolution => color_deconvolution}/color-deconvolution.xml (100%) rename tools/{color-deconvolution => color_deconvolution}/color_deconvolution.py (100%) rename tools/{color-deconvolution => color_deconvolution}/test-data/galaxyIcon_noText.png (100%) diff --git a/tools/color-deconvolution/.shed.yml b/tools/color_deconvolution/.shed.yml similarity index 100% rename from tools/color-deconvolution/.shed.yml rename to tools/color_deconvolution/.shed.yml diff --git a/tools/color-deconvolution/color-deconvolution.xml b/tools/color_deconvolution/color-deconvolution.xml similarity index 100% rename from tools/color-deconvolution/color-deconvolution.xml rename to tools/color_deconvolution/color-deconvolution.xml diff --git a/tools/color-deconvolution/color_deconvolution.py b/tools/color_deconvolution/color_deconvolution.py similarity index 100% rename from tools/color-deconvolution/color_deconvolution.py rename to tools/color_deconvolution/color_deconvolution.py diff --git a/tools/color-deconvolution/test-data/galaxyIcon_noText.png b/tools/color_deconvolution/test-data/galaxyIcon_noText.png similarity index 100% rename from tools/color-deconvolution/test-data/galaxyIcon_noText.png rename to tools/color_deconvolution/test-data/galaxyIcon_noText.png From d82926e1da36b8d20bf8987b39c3ec2c023c2f18 Mon Sep 17 00:00:00 2001 From: Leonid Kostrykin Date: Mon, 30 Sep 2024 12:40:39 +0200 Subject: [PATCH 4/9] Add util/check_directory_names.py --- util/README.md | 8 ++++++++ util/check_directory_names.py | 26 ++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100755 util/check_directory_names.py diff --git a/util/README.md b/util/README.md index a1677148..a1f835fc 100644 --- a/util/README.md +++ b/util/README.md @@ -1,5 +1,13 @@ # Utility scripts +## Check tool directory names + +Verify that the path of all tools contains the name of the corresponding tool shed repository: + +```bash +./util/check_directory_names.py +``` + ## Use case: An input TIFF file is too large Assuming that the TIFF file is an RGB file: diff --git a/util/check_directory_names.py b/util/check_directory_names.py new file mode 100755 index 00000000..6eafd37d --- /dev/null +++ b/util/check_directory_names.py @@ -0,0 +1,26 @@ +#!/bin/env python + +import glob +import pathlib +import yaml + + +gia_root_path = pathlib.Path(__file__).resolve().parent.parent +gia_root_dir_names = [gia_root_path.name] + [p.name for p in gia_root_path.parents if p.name != ''] + + +for path_str in glob.glob('./**/.shed.yml', recursive=True): + + # Read the .shed.yml file: + shed_file_path = pathlib.Path(path_str).resolve() + with shed_file_path.open('r') as shed_file: + shed = yaml.safe_load(shed_file) + ts_repo_name = shed['name'] + + # Check that the toolshed repo name corresponds to one of the parent directory names: + parent_dir_names = frozenset(p.name for p in shed_file_path.parents if p.name != '') - frozenset(gia_root_dir_names) + if ts_repo_name not in parent_dir_names: + print( + f'{shed_file_path.relative_to(gia_root_path)}: ' + f'{ts_repo_name} not in {", ".join(str(dir_name) for dir_name in parent_dir_names)}' + ) From 8d391e1a32344440a327619f11828c085837ffca Mon Sep 17 00:00:00 2001 From: Leonid Kostrykin Date: Mon, 30 Sep 2024 12:41:46 +0200 Subject: [PATCH 5/9] Move /tools/mahotas-features to /tools/mahotas_features --- .../.shed.yml | 0 .../mahotas_features.xml | 0 .../test-data/features.tsv | 0 .../test-data/galaxyIcon_noText.png | Bin 4 files changed, 0 insertions(+), 0 deletions(-) rename tools/{mahotas-features => mahotas_features}/.shed.yml (100%) rename tools/{mahotas-features => mahotas_features}/mahotas_features.xml (100%) rename tools/{mahotas-features => mahotas_features}/test-data/features.tsv (100%) rename tools/{mahotas-features => mahotas_features}/test-data/galaxyIcon_noText.png (100%) diff --git a/tools/mahotas-features/.shed.yml b/tools/mahotas_features/.shed.yml similarity index 100% rename from tools/mahotas-features/.shed.yml rename to tools/mahotas_features/.shed.yml diff --git a/tools/mahotas-features/mahotas_features.xml b/tools/mahotas_features/mahotas_features.xml similarity index 100% rename from tools/mahotas-features/mahotas_features.xml rename to tools/mahotas_features/mahotas_features.xml diff --git a/tools/mahotas-features/test-data/features.tsv b/tools/mahotas_features/test-data/features.tsv similarity index 100% rename from tools/mahotas-features/test-data/features.tsv rename to tools/mahotas_features/test-data/features.tsv diff --git a/tools/mahotas-features/test-data/galaxyIcon_noText.png b/tools/mahotas_features/test-data/galaxyIcon_noText.png similarity index 100% rename from tools/mahotas-features/test-data/galaxyIcon_noText.png rename to tools/mahotas_features/test-data/galaxyIcon_noText.png From f362478b4aaf427e98b2ff0019172ebda7075441 Mon Sep 17 00:00:00 2001 From: Leonid Kostrykin Date: Mon, 30 Sep 2024 12:43:13 +0200 Subject: [PATCH 6/9] Move tools/visceral-evaluatesegmentation to tools/visceral_evaluatesegmentation --- .../.shed.yml | 0 .../test-data/.gitignore | 0 .../test-data/out.xml | 0 .../test-data/sample.png | Bin .../visceral-evaluatesegmentation.xml | 0 5 files changed, 0 insertions(+), 0 deletions(-) rename tools/{visceral-evaluatesegmentation => visceral_evaluatesegmentation}/.shed.yml (100%) rename tools/{visceral-evaluatesegmentation => visceral_evaluatesegmentation}/test-data/.gitignore (100%) rename tools/{visceral-evaluatesegmentation => visceral_evaluatesegmentation}/test-data/out.xml (100%) rename tools/{visceral-evaluatesegmentation => visceral_evaluatesegmentation}/test-data/sample.png (100%) rename tools/{visceral-evaluatesegmentation => visceral_evaluatesegmentation}/visceral-evaluatesegmentation.xml (100%) diff --git a/tools/visceral-evaluatesegmentation/.shed.yml b/tools/visceral_evaluatesegmentation/.shed.yml similarity index 100% rename from tools/visceral-evaluatesegmentation/.shed.yml rename to tools/visceral_evaluatesegmentation/.shed.yml diff --git a/tools/visceral-evaluatesegmentation/test-data/.gitignore b/tools/visceral_evaluatesegmentation/test-data/.gitignore similarity index 100% rename from tools/visceral-evaluatesegmentation/test-data/.gitignore rename to tools/visceral_evaluatesegmentation/test-data/.gitignore diff --git a/tools/visceral-evaluatesegmentation/test-data/out.xml b/tools/visceral_evaluatesegmentation/test-data/out.xml similarity index 100% rename from tools/visceral-evaluatesegmentation/test-data/out.xml rename to tools/visceral_evaluatesegmentation/test-data/out.xml diff --git a/tools/visceral-evaluatesegmentation/test-data/sample.png b/tools/visceral_evaluatesegmentation/test-data/sample.png similarity index 100% rename from tools/visceral-evaluatesegmentation/test-data/sample.png rename to tools/visceral_evaluatesegmentation/test-data/sample.png diff --git a/tools/visceral-evaluatesegmentation/visceral-evaluatesegmentation.xml b/tools/visceral_evaluatesegmentation/visceral-evaluatesegmentation.xml similarity index 100% rename from tools/visceral-evaluatesegmentation/visceral-evaluatesegmentation.xml rename to tools/visceral_evaluatesegmentation/visceral-evaluatesegmentation.xml From 29550507d1dab6a476e41e339a13063f61a1591e Mon Sep 17 00:00:00 2001 From: Leonid Kostrykin Date: Mon, 30 Sep 2024 12:46:29 +0200 Subject: [PATCH 7/9] Move /tools/roi2binaryimage to /deprecated/tools/roi2binaryimage --- {tools => deprecated/tools}/roi2binaryimage/WARNING | 0 .../tools}/roi2binaryimage/roi2binaryimage.py | 0 .../tools}/roi2binaryimage/test-data/1.roi | Bin 3 files changed, 0 insertions(+), 0 deletions(-) rename {tools => deprecated/tools}/roi2binaryimage/WARNING (100%) rename {tools => deprecated/tools}/roi2binaryimage/roi2binaryimage.py (100%) rename {tools => deprecated/tools}/roi2binaryimage/test-data/1.roi (100%) diff --git a/tools/roi2binaryimage/WARNING b/deprecated/tools/roi2binaryimage/WARNING similarity index 100% rename from tools/roi2binaryimage/WARNING rename to deprecated/tools/roi2binaryimage/WARNING diff --git a/tools/roi2binaryimage/roi2binaryimage.py b/deprecated/tools/roi2binaryimage/roi2binaryimage.py similarity index 100% rename from tools/roi2binaryimage/roi2binaryimage.py rename to deprecated/tools/roi2binaryimage/roi2binaryimage.py diff --git a/tools/roi2binaryimage/test-data/1.roi b/deprecated/tools/roi2binaryimage/test-data/1.roi similarity index 100% rename from tools/roi2binaryimage/test-data/1.roi rename to deprecated/tools/roi2binaryimage/test-data/1.roi From f2bdc7769e6bb9c4516ad3a02e9af64da8beec45 Mon Sep 17 00:00:00 2001 From: Leonid Kostrykin Date: Mon, 30 Sep 2024 13:01:39 +0200 Subject: [PATCH 8/9] Move /tools/3d_tensor_feature_dimension_reduction to /deprecated/tools/3d_tensor_feature_dimension_reduction --- .../3d_tensor_feature_dimension_reduction/.shed.yml | 0 .../3d_tensor_feature_dimension_reduction.py | 0 .../3d_tensor_feature_dimension_reduction.xml | 0 .../test-data/tensor.h5 | Bin .../test-data/tensor_r.tif | Bin 5 files changed, 0 insertions(+), 0 deletions(-) rename {tools => deprecated/tools}/3d_tensor_feature_dimension_reduction/.shed.yml (100%) rename {tools => deprecated/tools}/3d_tensor_feature_dimension_reduction/3d_tensor_feature_dimension_reduction.py (100%) rename {tools => deprecated/tools}/3d_tensor_feature_dimension_reduction/3d_tensor_feature_dimension_reduction.xml (100%) rename {tools => deprecated/tools}/3d_tensor_feature_dimension_reduction/test-data/tensor.h5 (100%) rename {tools => deprecated/tools}/3d_tensor_feature_dimension_reduction/test-data/tensor_r.tif (100%) diff --git a/tools/3d_tensor_feature_dimension_reduction/.shed.yml b/deprecated/tools/3d_tensor_feature_dimension_reduction/.shed.yml similarity index 100% rename from tools/3d_tensor_feature_dimension_reduction/.shed.yml rename to deprecated/tools/3d_tensor_feature_dimension_reduction/.shed.yml diff --git a/tools/3d_tensor_feature_dimension_reduction/3d_tensor_feature_dimension_reduction.py b/deprecated/tools/3d_tensor_feature_dimension_reduction/3d_tensor_feature_dimension_reduction.py similarity index 100% rename from tools/3d_tensor_feature_dimension_reduction/3d_tensor_feature_dimension_reduction.py rename to deprecated/tools/3d_tensor_feature_dimension_reduction/3d_tensor_feature_dimension_reduction.py diff --git a/tools/3d_tensor_feature_dimension_reduction/3d_tensor_feature_dimension_reduction.xml b/deprecated/tools/3d_tensor_feature_dimension_reduction/3d_tensor_feature_dimension_reduction.xml similarity index 100% rename from tools/3d_tensor_feature_dimension_reduction/3d_tensor_feature_dimension_reduction.xml rename to deprecated/tools/3d_tensor_feature_dimension_reduction/3d_tensor_feature_dimension_reduction.xml diff --git a/tools/3d_tensor_feature_dimension_reduction/test-data/tensor.h5 b/deprecated/tools/3d_tensor_feature_dimension_reduction/test-data/tensor.h5 similarity index 100% rename from tools/3d_tensor_feature_dimension_reduction/test-data/tensor.h5 rename to deprecated/tools/3d_tensor_feature_dimension_reduction/test-data/tensor.h5 diff --git a/tools/3d_tensor_feature_dimension_reduction/test-data/tensor_r.tif b/deprecated/tools/3d_tensor_feature_dimension_reduction/test-data/tensor_r.tif similarity index 100% rename from tools/3d_tensor_feature_dimension_reduction/test-data/tensor_r.tif rename to deprecated/tools/3d_tensor_feature_dimension_reduction/test-data/tensor_r.tif From e1acdbef93bf06c81c638ab5c43df5b8fe5fc1f1 Mon Sep 17 00:00:00 2001 From: Leonid Kostrykin Date: Fri, 4 Oct 2024 12:20:46 +0200 Subject: [PATCH 9/9] Update util/README.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Björn Grüning --- util/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/README.md b/util/README.md index a1f835fc..8c7d23bb 100644 --- a/util/README.md +++ b/util/README.md @@ -2,7 +2,7 @@ ## Check tool directory names -Verify that the path of all tools contains the name of the corresponding tool shed repository: +Verify that the path of all tools contains the name of the corresponding tool shed repository or the name of a tool suite. ```bash ./util/check_directory_names.py