Skip to content

Commit fb74b8a

Browse files
committed
Adds artifact metadata
1 parent c272fef commit fb74b8a

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

databusclient/client.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,8 @@ def create_dataset(
253253
# was not sure if there are edge cases BASE=http://databus.example.org/"base"/...
254254
group_id = _versionId.rsplit("/", 2)[0]
255255

256+
artifact_id = _versionId.rsplit("/", 1)[0]
257+
256258
distribution_list = []
257259
for dst_string in distributions:
258260
__url = str(dst_string).split("|")[0]
@@ -303,6 +305,17 @@ def create_dataset(
303305

304306
graphs.append(group_dict)
305307

308+
# add the artifact graph
309+
310+
artifact_graph = {
311+
"@id": artifact_id,
312+
"@type": "Artifact",
313+
"title": title,
314+
"abstract": abstract,
315+
"description": description
316+
}
317+
graphs.append(artifact_graph)
318+
306319
# add the dataset graph
307320

308321
dataset_graph = {

0 commit comments

Comments
 (0)