Skip to content

Conversation

@guilpier-code
Copy link
Contributor

Small refactoring : we move the path search for binary program to execute into the main program.
It allows :

  • the executable path finding is now out from the loop over studies. Inside the loop, this task was unnecessarily repeated. Now it's done once.
  • it lightens the command making function, for which it's not the responsibility to search an executable path

…rogram

Note that executable finding is now out from the loop over studies.
Inside the loop, this task was unnecessarily repeated.
Now it's done once.
@guilpier-code guilpier-code marked this pull request as ready for review April 4, 2024 11:31

return studies

def get_headers(df) -> set :
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

get_headers is unused. It is removed.

raise RuntimeError("Missing {searched_exe}")

def make_command_to_run(path_where_to_find_exe, batch_name, study_path):
def make_command_to_run(exe_path, batch_name, study_path):
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make_command_to_run function is now simplified.
Code about finding the executable path was moved elsewhere (into the main program)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants