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

Small modifications to PR #16: Adding .env vars for sfapi credentials, import dependency fix #17

Merged
merged 2 commits into from
Apr 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions orchestration/flows/bl7012/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,19 @@
from orchestration import globus
from ptycho_nersc import NerscPtychoClient

import os

class Config7012:
def __init__(
self,
path_client_id,
path_priv_key,
) -> None:
config = globus.get_config()
self.endpoints = globus.build_endpoints(config)
self.apps = globus.build_apps(config)
self.tc: TransferClient = globus.init_transfer_client(self.apps["als_transfer"])
self.nersc = NerscPtychoClient(
path_client_id,
path_priv_key,
os.getenv("PATH_NERSC_ID"),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think of providing a default here that points to the folder that we put into .gitignore?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did consider that, but I used this approach in case we moved folders at any point, for the class or the keys. Open to either solution for this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really want to encourage developers (including future me) to by default put those files into the directory that is in .gitignore.

os.getenv("PATH_NERSC_PRI_KEY"),
)
self.nersc7012 = self.endpoints["nersc7012"]
self.data7012 = self.endpoints["data7012"]
2 changes: 1 addition & 1 deletion orchestration/flows/bl7012/ptycho_nersc.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from orchestration.ptycho_jobscript import (
from orchestration.flows.bl7012.ptycho_jobscript import (
get_job_script,
cdtool_args_string,
ptychocam_args_string,
Expand Down
Loading