Skip to content

Commit

Permalink
would add dupes
Browse files Browse the repository at this point in the history
  • Loading branch information
hexylena committed Jun 24, 2024
1 parent 2a25d30 commit ff92205
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions bin/wfh-upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@
)

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

payload = {
"ro_crate": (crate_path, open(crate_path, "rb")),
"workflow[project_ids][]": (None, GTN_PROJECT_ID), # GTN's ID.
Expand All @@ -45,6 +42,13 @@ def doUpload(crate_path):
"id": wfid,
"type": "workflows",
"attributes": {
# Adds duplicate links so, commented for now. No bug has been filed.
# "discussion_links": [
# {
# "label": "Matrix",
# "url": "https://matrix.to/#/%23galaxyproject_admin:gitter.im"
# }
# ],
"policy": {
"access": "download",
"permissions": [
Expand All @@ -68,6 +72,8 @@ def doUpload(crate_path):
if response2.status_code != 200:
print(f"Error {response2.status_code} updating permissions for {wfid}: {response2.text}")

p = crate_path.split("/")
(topic, tutorial, workflow) = p[3:6]
return (topic, tutorial, workflow, wfid)


Expand Down

0 comments on commit ff92205

Please sign in to comment.