From b7efc89d38a9ddfcb7bfe0da8f6839326077a962 Mon Sep 17 00:00:00 2001 From: Robrecht Cannoodt Date: Wed, 4 Dec 2024 09:50:21 +0100 Subject: [PATCH] Enable unit tests (#5) * enable unit tests * fix data path --- scripts/create_resources/test_resources.sh | 3 ++- src/api/comp_control_method.yaml | 14 +++++++------- src/api/comp_data_processor.yaml | 10 +++++----- src/api/comp_method.yaml | 18 +++++++++--------- src/api/comp_metric.yaml | 14 +++++++------- src/metrics/accuracy/config.vsh.yaml | 2 ++ 6 files changed, 32 insertions(+), 29 deletions(-) diff --git a/scripts/create_resources/test_resources.sh b/scripts/create_resources/test_resources.sh index 408b8f3..e1c3775 100755 --- a/scripts/create_resources/test_resources.sh +++ b/scripts/create_resources/test_resources.sh @@ -110,5 +110,6 @@ viash run src/data_processors/process_dataset/config.vsh.yaml -- \ # # only run this if you have access to the openproblems-data bucket aws s3 sync --profile op \ - "$DATASET_DIR" s3://openproblems-data/resources_test/task_cyto_batch_integration \ + resources_test/task_cyto_batch_integration/starter_file \ + s3://openproblems-data/resources_test/task_cyto_batch_integration/starter_file \ --delete --dryrun diff --git a/src/api/comp_control_method.yaml b/src/api/comp_control_method.yaml index ee79cf0..12b9fc9 100644 --- a/src/api/comp_control_method.yaml +++ b/src/api/comp_control_method.yaml @@ -24,10 +24,10 @@ arguments: __merge__: file_integrated.yaml required: true direction: output -# test_resources: -# - type: python_script -# path: /common/component_tests/run_and_check_output.py -# - type: python_script -# path: /common/component_tests/check_config.py -# - path: /resources_test/task_cyto_batch_integration/cxg_mouse_pancreas_atlas -# dest: resources_test/task_cyto_batch_integration/cxg_mouse_pancreas_atlas \ No newline at end of file +test_resources: + - type: python_script + path: /common/component_tests/run_and_check_output.py + - type: python_script + path: /common/component_tests/check_config.py + - path: /resources_test/task_cyto_batch_integration/starter_file + dest: resources_test/task_cyto_batch_integration/starter_file \ No newline at end of file diff --git a/src/api/comp_data_processor.yaml b/src/api/comp_data_processor.yaml index 482de93..702c721 100644 --- a/src/api/comp_data_processor.yaml +++ b/src/api/comp_data_processor.yaml @@ -23,9 +23,9 @@ arguments: __merge__: file_validation.yaml direction: output required: true -# test_resources: -# - path: /resources_test/common/cxg_mouse_pancreas_atlas -# dest: resources_test/common/cxg_mouse_pancreas_atlas -# - type: python_script -# path: /common/component_tests/run_and_check_output.py +test_resources: + - type: python_script + path: /common/component_tests/run_and_check_output.py + - path: /resources_test/task_cyto_batch_integration/starter_file + dest: resources_test/task_cyto_batch_integration/starter_file diff --git a/src/api/comp_method.yaml b/src/api/comp_method.yaml index 88eafd4..d97ba5b 100644 --- a/src/api/comp_method.yaml +++ b/src/api/comp_method.yaml @@ -3,9 +3,9 @@ info: type: method type_info: label: Method - summary: A method. + summary: A method for integrating batch effects in cytometry data. description: | - A method to predict the task effects. + A method for integrating batch effects in cytometry data. arguments: - name: --input __merge__: file_unintegrated_censored.yaml @@ -15,10 +15,10 @@ arguments: __merge__: file_integrated.yaml required: true direction: output -# test_resources: -# - type: python_script -# path: /common/component_tests/run_and_check_output.py -# - type: python_script -# path: /common/component_tests/check_config.py -# - path: /resources_test/task_cyto_batch_integration/cxg_mouse_pancreas_atlas -# dest: resources_test/task_cyto_batch_integration/cxg_mouse_pancreas_atlas \ No newline at end of file +test_resources: + - type: python_script + path: /common/component_tests/run_and_check_output.py + - type: python_script + path: /common/component_tests/check_config.py + - path: /resources_test/task_cyto_batch_integration/starter_file + dest: resources_test/task_cyto_batch_integration/starter_file \ No newline at end of file diff --git a/src/api/comp_metric.yaml b/src/api/comp_metric.yaml index 87b68b4..273db16 100644 --- a/src/api/comp_metric.yaml +++ b/src/api/comp_metric.yaml @@ -23,10 +23,10 @@ arguments: __merge__: file_score.yaml direction: output required: true -# test_resources: -# - type: python_script -# path: /common/component_tests/run_and_check_output.py -# - type: python_script -# path: /common/component_tests/check_config.py -# - path: /resources_test/task_cyto_batch_integration/cxg_mouse_pancreas_atlas -# dest: resources_test/task_cyto_batch_integration/cxg_mouse_pancreas_atlas +test_resources: + - type: python_script + path: /common/component_tests/run_and_check_output.py + - type: python_script + path: /common/component_tests/check_config.py + - path: /resources_test/task_cyto_batch_integration/starter_file + dest: resources_test/task_cyto_batch_integration/starter_file diff --git a/src/metrics/accuracy/config.vsh.yaml b/src/metrics/accuracy/config.vsh.yaml index 66fa835..f4184c0 100644 --- a/src/metrics/accuracy/config.vsh.yaml +++ b/src/metrics/accuracy/config.vsh.yaml @@ -10,6 +10,8 @@ __merge__: ../../api/comp_metric.yaml # Can contain only lowercase letters or underscores. name: accuracy +status: disabled + # Metadata for your component info: metrics: