Skip to content

Commit

Permalink
Refactor command construction in fire_jobs.py for improved directory …
Browse files Browse the repository at this point in the history
…handling
  • Loading branch information
Alex Al-Saffar committed Dec 14, 2024
1 parent 477e990 commit 2f98fb8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/machineconfig/scripts/python/fire_jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,13 +195,13 @@ def main() -> None:
command = f"{exe} -m fire {choice_file} {choice_function} {kwargs_str}"
elif args.streamlit:
# for .streamlit config to work, it needs to be in the current directory.
command = f"{exe} {choice_file} "
command = f"cd {choice_file.parent}\n\n{exe} {choice_file.name}\n\ncd {P.cwd()}"
elif args.cmd:
command = rf""" cd /d {choice_file.parent} & {exe} {choice_file.name} """
else:
command = f"cd {choice_file.parent}\n\n{exe} {choice_file.name}\n\ncd {P.cwd()}"
command = f"cd {choice_file.parent}\n\n{exe} {choice_file.name}\n\ncd {P.cwd()}"
# command = f"cd {choice_file.parent}\n\n{exe} {choice_file.name}\n\ncd {P.cwd()}"

command = f"{exe} {choice_file} "
# this installs in ve env, which is not execution env
# if "ipdb" in command: install_n_import("ipdb")
# if "pudb" in command: install_n_import("pudb")
Expand Down

0 comments on commit 2f98fb8

Please sign in to comment.