Skip to content

Commit

Permalink
adding the sonnet analyze basic functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan-Manning committed Dec 4, 2023
1 parent ce119bf commit b8fe585
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions src/sonnetsuiteshelper/run_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,13 @@ def analyze(project_name: str, remote: Dict = {}, param_file: str = ""):
if remote:
keys_needed = ["host", "port"]
if all(key in remote for key in keys_needed):
run_cmd += f" -Server {remote["host"]}:{remote["port"]}"
run_cmd += f' -Server {remote["host"]}:{remote["port"]}'
else:
raise(KeyError(f"remote parameter does not contain the keys needed.\nThe keys needed are {keys_needed}.\nCurrent keys are {list(remote.keys())}"))
raise (
KeyError(
f"remote parameter does not contain the keys needed.\nThe keys needed are {keys_needed}.\nCurrent keys are {list(remote.keys())}"
)
)

# If this should be run with a parameter file try to add it to the run command
if param_file:
Expand All @@ -59,14 +63,3 @@ def analyze(project_name: str, remote: Dict = {}, param_file: str = ""):
cmd_output = subprocess.Popen(run_cmd, shell=True, stdout=subprocess.PIPE).stdout.read()

return cmd_output











0 comments on commit b8fe585

Please sign in to comment.