Skip to content

Commit

Permalink
fix how the upload works
Browse files Browse the repository at this point in the history
  • Loading branch information
hexylena committed Jun 24, 2024
1 parent a769436 commit 8feaff6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/wfh-upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

def doUpload(crate_path):
p = crate_path.split("/")
(topic, tutorial, workflow) = p[4:7]
(topic, tutorial, workflow) = p[3:6]

payload = {
"ro_crate": (crate_path, open(crate_path, "rb")),
Expand Down Expand Up @@ -78,7 +78,7 @@ def doUpload(crate_path):

data = {}
for (topic, tutorial, workflow, wf_id) in results:
data.setdefault(topic, {}).setdefault(tutorial, {})[workflow] = wf_id
data['/'.join([topic, tutorial, workflow])] = wf_id

with open('metadata/workflowhub.yml', 'w') as handle:
yaml.dump(data, handle)

0 comments on commit 8feaff6

Please sign in to comment.