Skip to content

Commit

Permalink
Fix bug in parsing args
Browse files Browse the repository at this point in the history
  • Loading branch information
AuguB committed Dec 11, 2024
1 parent fbf7ac4 commit 78d3722
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions tests/cli_test_parallel_kfold/submit_jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@
from pcntoolkit.normative_parallel import execute_nm


def execute_nm_wrapper(*args, **kwargs):
func = kwargs.get('func')
covfile_path = kwargs.get('covfile_path',None)
respfile_path = kwargs.get('respfile_path',None)
testcovfile_path = kwargs.get('testcovfile_path',None)
testrespfile_path = kwargs.get('testrespfile_path',None)
def execute_nm_wrapper(*args):
args_dict = {k:v for k,v in [arg.split('=') for arg in args]}

func = args_dict.get('func')
covfile_path = args_dict.get('covfile_path',None)
respfile_path = args_dict.get('respfile_path',None)
testcovfile_path = args_dict.get('testcovfile_path',None)
testrespfile_path = args_dict.get('testrespfile_path',None)

execute_nm(
python_path='/home/preclineu/stijdboe/.conda/envs/pcntk_dev/bin/python',
Expand All @@ -35,8 +37,8 @@ def execute_nm_wrapper(*args, **kwargs):
)


def main(*args, **kwargs):
execute_nm_wrapper(*args, **kwargs)
def main(*args):
execute_nm_wrapper(*args)

if __name__ == "__main__":
main(sys.argv[1:])

0 comments on commit 78d3722

Please sign in to comment.