Skip to content

Commit

Permalink
moved the symlinking from sammyRunner to sammyUtils
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmlongLANL committed Jul 11, 2024
1 parent 773f7b4 commit 60cb725
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions pleiades/sammyRunner.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,6 @@ def single_run(fit_dir: str= "", input_file: str = "", par_file: str = "", data_
raise ValueError("Parameter file is required")
if not data_file:
raise ValueError("Data file is required")

# Create a symbolic link to the data file in the fit_dir
data_file_name = pathlib.Path(data_file).name

# Check if the symbolic link already exists
if os.path.islink(pathlib.Path(fit_dir) / data_file_name):
os.unlink(pathlib.Path(fit_dir) / data_file_name) # unlink old symlink

os.symlink(data_file, pathlib.Path(fit_dir) / data_file_name) # create new symlink

# Check if files exist
full_path_to_input_file = pathlib.Path(fit_dir) / input_file
Expand Down Expand Up @@ -62,7 +53,7 @@ def single_run(fit_dir: str= "", input_file: str = "", par_file: str = "", data_
sammy <<EOF
{input_file}
{par_file}
{data_file_name}
{data_file}
EOF""")

Expand Down

0 comments on commit 60cb725

Please sign in to comment.