Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring : move exe finding from command building to main program #6

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

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
@@ -26,9 +26,6 @@ def find_studies_in_batch_dir(batch_name):

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.

@@ -14,33 +20,22 @@ def find_exe_path(path_to_search_exe_in, exe_identifier):
return path_item.resolve()
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.

1 participant