From d6c12dfa14078dd3a2c6f545530e648b4dbf5191 Mon Sep 17 00:00:00 2001 From: brad Date: Fri, 17 Nov 2023 11:37:07 -0500 Subject: [PATCH 01/10] commit with bad list comprehensions and incorrect syntax --- scripts/remote.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/remote.py b/scripts/remote.py index 895dd80..fc72231 100644 --- a/scripts/remote.py +++ b/scripts/remote.py @@ -6,8 +6,9 @@ def remote_1(args): input_list = args["input"] myval = np.mean([input_list[site]["output_val"] for site in input_list]) - + i = [i for i, _ in zip(range(10), [j for j,_ in zip(range(10), [k for k in range(10)])]] computation_output = {"output": {"output_list": myval}, "success": True} + bad_syntax = FALSE return computation_output From ada7b90e4b64bfd3e38afb8aa106fb55423ef16b Mon Sep 17 00:00:00 2001 From: brad Date: Fri, 17 Nov 2023 12:05:17 -0500 Subject: [PATCH 02/10] eno --- scripts/local.py | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/local.py b/scripts/local.py index 5abe761..c3f18ec 100644 --- a/scripts/local.py +++ b/scripts/local.py @@ -1,3 +1,4 @@ +# A comment import os from ancillary import list_recursive From d6f53a242043dc82f6f4359a884670536de2472d Mon Sep 17 00:00:00 2001 From: brad Date: Fri, 17 Nov 2023 12:18:10 -0500 Subject: [PATCH 03/10] fixed? --- scripts/local.py | 2 -- scripts/remote.py | 2 -- 2 files changed, 4 deletions(-) diff --git a/scripts/local.py b/scripts/local.py index c3f18ec..76cf79a 100644 --- a/scripts/local.py +++ b/scripts/local.py @@ -1,10 +1,8 @@ -# A comment import os from ancillary import list_recursive def local_1(args): - input_list = args["input"] myFile = input_list["covariates"] diff --git a/scripts/remote.py b/scripts/remote.py index fc72231..6e2eedf 100644 --- a/scripts/remote.py +++ b/scripts/remote.py @@ -6,9 +6,7 @@ def remote_1(args): input_list = args["input"] myval = np.mean([input_list[site]["output_val"] for site in input_list]) - i = [i for i, _ in zip(range(10), [j for j,_ in zip(range(10), [k for k in range(10)])]] computation_output = {"output": {"output_list": myval}, "success": True} - bad_syntax = FALSE return computation_output From f71a95ccb5cd4293370d321e46541d028a8c6f57 Mon Sep 17 00:00:00 2001 From: brad Date: Fri, 17 Nov 2023 12:26:15 -0500 Subject: [PATCH 04/10] docstrings --- scripts/local.py | 6 ++++++ scripts/remote.py | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/scripts/local.py b/scripts/local.py index 76cf79a..831750e 100644 --- a/scripts/local.py +++ b/scripts/local.py @@ -3,6 +3,9 @@ def local_1(args): + """local_1 + args is the COINSTAC argument dictionary + """ input_list = args["input"] myFile = input_list["covariates"] @@ -21,6 +24,9 @@ def local_1(args): def start(PARAM_DICT): + """start + entry point and control flow for remote computations + """ PHASE_KEY = list(list_recursive(PARAM_DICT, "computation_phase")) if not PHASE_KEY: diff --git a/scripts/remote.py b/scripts/remote.py index 6e2eedf..45822de 100644 --- a/scripts/remote.py +++ b/scripts/remote.py @@ -3,7 +3,9 @@ def remote_1(args): - + """remote_1 aggregates the numeric input from local sites + args is the dictionary received from local sites + """ input_list = args["input"] myval = np.mean([input_list[site]["output_val"] for site in input_list]) computation_output = {"output": {"output_list": myval}, "success": True} @@ -11,6 +13,7 @@ def remote_1(args): def start(PARAM_DICT): + """start controls the work flow for the local nodes""" PHASE_KEY = list(list_recursive(PARAM_DICT, "computation_phase")) if "local_1" in PHASE_KEY: From 2854b2143dfc81ec5169058c5f8d45166b89abdc Mon Sep 17 00:00:00 2001 From: brad Date: Fri, 17 Nov 2023 12:37:37 -0500 Subject: [PATCH 05/10] trying to fix --- scripts/local.py | 4 ++-- scripts/remote.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/local.py b/scripts/local.py index 831750e..b6d642b 100644 --- a/scripts/local.py +++ b/scripts/local.py @@ -4,7 +4,7 @@ def local_1(args): """local_1 - args is the COINSTAC argument dictionary + args is the COINSTAC argument dictionary """ input_list = args["input"] myFile = input_list["covariates"] @@ -25,7 +25,7 @@ def local_1(args): def start(PARAM_DICT): """start - entry point and control flow for remote computations + entry point and control flow for remote computations """ PHASE_KEY = list(list_recursive(PARAM_DICT, "computation_phase")) diff --git a/scripts/remote.py b/scripts/remote.py index 45822de..896f69f 100644 --- a/scripts/remote.py +++ b/scripts/remote.py @@ -4,7 +4,7 @@ def remote_1(args): """remote_1 aggregates the numeric input from local sites - args is the dictionary received from local sites + args is the dictionary received from local sites """ input_list = args["input"] myval = np.mean([input_list[site]["output_val"] for site in input_list]) From 46607987d216868932deaea52d9ee7f738045932 Mon Sep 17 00:00:00 2001 From: brad Date: Fri, 17 Nov 2023 12:38:33 -0500 Subject: [PATCH 06/10] fixed imports --- scripts/local.py | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/local.py b/scripts/local.py index b6d642b..50a7655 100644 --- a/scripts/local.py +++ b/scripts/local.py @@ -1,4 +1,5 @@ import os + from ancillary import list_recursive From 6abf8787600055685738b7681071d93d652cc488 Mon Sep 17 00:00:00 2001 From: brad Date: Fri, 17 Nov 2023 12:47:23 -0500 Subject: [PATCH 07/10] fixed? --- scripts/local.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/scripts/local.py b/scripts/local.py index 50a7655..f006916 100644 --- a/scripts/local.py +++ b/scripts/local.py @@ -14,12 +14,7 @@ def local_1(args): myval = fh.readlines() myval = list(map(int, myval)) - computation_output = { - "output": { - "output_val": myval, - "computation_phase": 'local_1' - } - } + computation_output = {"output": {"output_val": myval,"computation_phase": 'local_1'}} return computation_output From 11b2f57f024c64dd7b3121a709b1ce46a3e2cd35 Mon Sep 17 00:00:00 2001 From: brad Date: Fri, 17 Nov 2023 12:50:20 -0500 Subject: [PATCH 08/10] fixed --- scripts/local.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/local.py b/scripts/local.py index f006916..006890f 100644 --- a/scripts/local.py +++ b/scripts/local.py @@ -14,7 +14,7 @@ def local_1(args): myval = fh.readlines() myval = list(map(int, myval)) - computation_output = {"output": {"output_val": myval,"computation_phase": 'local_1'}} + computation_output = {"output": {"output_val": myval, "computation_phase": 'local_1'}} return computation_output From cf45eb23c502022390dac05dbf00b6d1574f6121 Mon Sep 17 00:00:00 2001 From: brad Date: Fri, 17 Nov 2023 12:53:12 -0500 Subject: [PATCH 09/10] fixed --- scripts/local.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/local.py b/scripts/local.py index 006890f..a0f42dd 100644 --- a/scripts/local.py +++ b/scripts/local.py @@ -14,7 +14,9 @@ def local_1(args): myval = fh.readlines() myval = list(map(int, myval)) - computation_output = {"output": {"output_val": myval, "computation_phase": 'local_1'}} + computation_output = { + "output": {"output_val": myval, "computation_phase": 'local_1'} + } return computation_output From 0d102cbbe27940f5dd7c5e7e3cb1ee8240d049b4 Mon Sep 17 00:00:00 2001 From: brad Date: Fri, 17 Nov 2023 12:53:55 -0500 Subject: [PATCH 10/10] fixed --- scripts/local.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/local.py b/scripts/local.py index a0f42dd..6f6447e 100644 --- a/scripts/local.py +++ b/scripts/local.py @@ -15,7 +15,7 @@ def local_1(args): myval = list(map(int, myval)) computation_output = { - "output": {"output_val": myval, "computation_phase": 'local_1'} + "output": {"output_val": myval, "computation_phase": "local_1"} } return computation_output