Skip to content

Commit

Permalink
feat: add @id to Dataset type in SOSO files
Browse files Browse the repository at this point in the history
Enhance the `main.create_soso_files` function to include the `@id`
property for the `Dataset` type. Use the data package landing page URL
instead of the DOI to provide a more transparent and accessible
identifier.

This update also leverages improvements in the `soso` package v0.2.0 to
enhance downstream linkages between knowledge graph URIs.
  • Loading branch information
clnsmth authored Sep 27, 2024
1 parent 58b282a commit 9c19ec2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/spinneret/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ def create_soso_files(eml_dir: str, output_dir: str) -> None:
+ "&revision="
+ revision
)
# @id
dataset_id = url
# is_accessible_for_free
is_accessible_for_free = True
# doi
Expand Down Expand Up @@ -219,6 +221,7 @@ def get_subject_of(self):
"provider": provider,
"publisher": publisher,
"identifier": identifier,
"@id": dataset_id,
}
json_ld = convert(
file=eml_dir + "/" + eml_file, strategy="EML", **additional_properties
Expand Down Expand Up @@ -272,8 +275,8 @@ def create_kgraph(soso_dir: str, vocabulary_dir: str) -> Graph:
# )

# create_soso_files(
# eml_dir="/Users/csmith/Data/kgraph/eml/annotated",
# output_dir="/Users/csmith/Data/kgraph/soso/annotated",
# eml_dir="/Users/csmith/Data/kgraph/eml/test",
# output_dir="/Users/csmith/Data/kgraph/soso/test",
# )

# g = create_kgraph(
Expand Down

0 comments on commit 9c19ec2

Please sign in to comment.