Skip to content

Commit b55d071

Browse files
author
Max Burnette
committed
fix url formatting and EnvironmentLogger metadata
1 parent 885a3ae commit b55d071

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

scripts/upload_directories_to_clowder.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@
4343
# ---------------------------------
4444
# Clowder instance configuration
4545
# ---------------------------------
46-
clowder_host = "https://terraref.ncsa.illinois.edu/clowder"
4746
clowder_admin_key = "SECRET_KEY"
47+
clowder_host = "https://terraref.ncsa.illinois.edu/clowder/"
4848
# The following user will be shown as the creator and owner of uploaded datasets
4949
clowder_user = "terrarefglobus+uamac@ncsa.illinois.edu"
5050
clowder_pass = "PASSWORD"
@@ -116,7 +116,7 @@ def upload_dataset(dataset_path, level, product, timestamp, sess, logfile):
116116
if dry_run:
117117
print("...%s successfully loaded." % os.path.join(dataset_path, f))
118118

119-
if clean_md is None:
119+
if clean_md is None and product is not "EnvironmentLogger":
120120
logfile.write('%s,%s,"%s",%s\n' % (level, product, dataset_path, "ERR: No metadata found"))
121121
return False
122122

@@ -134,8 +134,8 @@ def upload_dataset(dataset_path, level, product, timestamp, sess, logfile):
134134
logfile.write('%s,%s,"%s",%s\n' % (level, product, dataset_path, "OK: %s" % dsid))
135135

136136
# Upload metadata
137-
if not dry_run:
138-
sess.post("%s/api/datasets/%s/metadata.jsonld" % (clowder_host, dsid),
137+
if not dry_run and product is not "EnvironmentLogger":
138+
sess.post("%sapi/datasets/%s/metadata.jsonld" % (clowder_host, dsid),
139139
headers={'Content-Type':'application/json'},
140140
data=json.dumps({
141141
"@context": ["https://clowder.ncsa.illinois.edu/contexts/metadata.jsonld",

0 commit comments

Comments
 (0)