Skip to content

Commit

Permalink
Move SPARQL to tests and update create_ro_crate
Browse files Browse the repository at this point in the history
  • Loading branch information
alexhambley committed Sep 11, 2024
1 parent a71cdc6 commit 9d74326
Show file tree
Hide file tree
Showing 15 changed files with 14 additions and 7 deletions.
File renamed without changes.
Empty file added tests/SPARQL/__init__.py
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
21 changes: 14 additions & 7 deletions workflowhub_graph/create_ro_crate.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ def create_ro_crate(input_file: str, workflow_file: str, output_dir: str) -> Non
auth_1 = crate.add(
Person(
crate,
"https://orcid.org/0000-0000-0000-0000",
"https://orcid.org/0000-0003-1193-6632",
properties={
"name": "Alexander Hambley",
"givenName": "Alexander",
"familyName": "Hambley",
"affiliation": "University of Manchester",
},
)
Expand All @@ -37,7 +38,8 @@ def create_ro_crate(input_file: str, workflow_file: str, output_dir: str) -> Non
crate,
"https://orcid.org/0000-0002-0035-6475",
properties={
"name": "Eli Chadwick",
"givenName": "Eli",
"familyName": "Chadwick",
"affiliation": "University of Manchester",
},
)
Expand All @@ -47,7 +49,8 @@ def create_ro_crate(input_file: str, workflow_file: str, output_dir: str) -> Non
crate,
"https://orcid.org/0000-0002-4565-9760",
properties={
"name": "Oliver Woolland",
"givenName": "Oliver",
"familyName": "Woolland",
"affiliation": "University of Manchester",
},
)
Expand All @@ -57,7 +60,8 @@ def create_ro_crate(input_file: str, workflow_file: str, output_dir: str) -> Non
crate,
"https://orcid.org/0000-0001-9842-9718",
properties={
"name": "Stian Soiland-Reyes",
"givenName": "Stian",
"familyName": "Soiland-Reyes",
"affiliation": "University of Manchester",
},
)
Expand All @@ -67,12 +71,15 @@ def create_ro_crate(input_file: str, workflow_file: str, output_dir: str) -> Non
crate,
"https://orcid.org/0000-0001-6353-0808",
properties={
"name": "Volodymyr Savchenko",
"givenName": "Volodymyr",
"familyName": "Savchenko",
"affiliation": "University of Geneva",
},
)
)

crate.root_dataset["author"] = [auth_1, auth_2, auth_3, auth_4, auth_5]

# Add dataset and files:
crate.add_dataset(
"./workflowhub_graph/",
Expand Down Expand Up @@ -139,7 +146,7 @@ def create_ro_crate(input_file: str, workflow_file: str, output_dir: str) -> Non
)

# Add license:
crate.license = "https://opensource.org/license/bsd-2-clause"
crate.license = "https://spdx.org/licenses/BSD-2-Clause.html"

# Writing the RO-Crate metadata:
crate.write(output_dir)
Expand Down

0 comments on commit 9d74326

Please sign in to comment.