Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 28, 2024
1 parent c07e55f commit 3a192aa
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
10 changes: 5 additions & 5 deletions examples/python_large_output/download_output_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def download_files(client, project_name):
log.info(f"Downloading files to {out_path}")

jms_api = JmsApi(client)
project = jms_api.get_project_by_name(name=project_name)
project = jms_api.get_project_by_name(name=project_name)
project = jms_api.get_project(id=project.id)

log.info(f"Project id: {project.id}")
Expand All @@ -66,9 +66,9 @@ def download_files(client, project_name):
fpath = os.path.join(out_path, f"task_{task.id}")
log.info(f"Download output file {f.evaluation_path} to {fpath}")
start = time.process_time()
project_api.download_file(file=f, target_path=fpath)
log.info(f"Time taken to download output file: {(time.time() - start):.2f} seconds"
)
project_api.download_file(file=f, target_path=fpath)
log.info(f"Time taken to download output file: {(time.time() - start):.2f} seconds")


if __name__ == "__main__":

Expand All @@ -90,4 +90,4 @@ def download_files(client, project_name):
download_files(client=client, project_name=args.name)

except HPSError as e:
log.error(str(e))
log.error(str(e))
7 changes: 6 additions & 1 deletion examples/python_large_output/project_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,11 @@ def create_project(client, name, use_exec_script, python_version=None) -> Projec
client = Client(url=args.url, username=args.username, password=args.password)

try:
create_project(client, name=args.name, use_exec_script=args.use_exec_script, python_version=args.python_version)
create_project(
client,
name=args.name,
use_exec_script=args.use_exec_script,
python_version=args.python_version,
)
except HPSError as e:
log.error(str(e))

0 comments on commit 3a192aa

Please sign in to comment.