Skip to content

Commit

Permalink
cleaned up references
Browse files Browse the repository at this point in the history
  • Loading branch information
blue442 committed Mar 19, 2024
1 parent f1564c7 commit 2c3e0b3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions foundry/foundry.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,8 +413,8 @@ def publish_dataset(self,
self.validate(clean_dc_json)

# ensure that one of `https_data_path` or `globus_data_source` have been assigned values
if (https_data_path and globus_data_source) or \
(https_data_path is None and globus_data_source is None):
if (foundry_dataset.https_data_path and foundry_dataset.globus_data_source) or \
(foundry_dataset.https_data_path is None and foundry_dataset.globus_data_source is None):
raise ValueError("Must assign either `https_data_path` or `globus_data_source`")

self.connect_client.create_dc_block(
Expand All @@ -432,7 +432,7 @@ def publish_dataset(self,
self.connect_client.set_project_block(self.config.metadata_key)

# upload via HTTPS if specified
if https_data_path:
if foundry_dataset.https_data_path:
# gather auth'd clients necessary for publication to endpoint
endpoint_id = "82f1b5c6-6e9b-11e5-ba47-22000b92c6ec" # NCSA endpoint
scope = f"https://auth.globus.org/scopes/{endpoint_id}/https" # lets you HTTPS to specific endpoint
Expand All @@ -442,7 +442,7 @@ def publish_dataset(self,
endpoint_auth_clients={endpoint_id: AuthClient(authorizer=self.auths[scope])}
)
# upload (ie publish) data to endpoint
globus_data_source = upload_to_endpoint(pub_auths, https_data_path, endpoint_id)
globus_data_source = upload_to_endpoint(pub_auths, foundry_dataset.https_data_path, endpoint_id)
# set Globus data source URL with MDF
self.connect_client.add_data_source(globus_data_source)
# set dataset name using the title if an abbreviated short_name isn't specified
Expand Down

0 comments on commit 2c3e0b3

Please sign in to comment.