Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions share/sources/org.datacite/source.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ configs:
namespaces:
'http://purl.org/dc/elements/1.1/': dc
'http://datacite.org/schema/kernel-3': null
'http://datacite.org/schema/kernel-4': null
'http://www.openarchives.org/OAI/2.0/': null
'http://schema.datacite.org/oai/oai-1.0/': null
'http://www.openarchives.org/OAI/2.0/oai_dc/': null
Expand Down
19 changes: 11 additions & 8 deletions share/transformers/org_datacite.py
Original file line number Diff line number Diff line change
Expand Up @@ -488,9 +488,14 @@ def get_schema(self, type):
force_text,
tools.Try(ctx.record.metadata['oai_datacite'].payload.resource.titles.title)
)
description = tools.RunPython(
force_text,
tools.Try(ctx.record.metadata['oai_datacite'].payload.resource.descriptions.description[0])

description = tools.Try(
tools.Join(
tools.RunPython(
'text_list',
tools.Try(ctx.record.metadata['oai_datacite'].payload.resource.descriptions.description)
)
)
)

rights = tools.Try(
Expand Down Expand Up @@ -541,22 +546,20 @@ def get_schema(self, type):
tools.Subjects(
tools.RunPython(
'text_list',
tools.Concat(
tools.Try(ctx.record.metadata['oai_datacite'].payload.resource.subjects.subject),
)
tools.Try(ctx.record.metadata['oai_datacite'].payload.resource.subjects.subject)
)
)
)

tags = tools.Map(
tools.Delegate(ThroughTags),
tools.RunPython(
force_text,
'text_list',
tools.Concat(
tools.Maybe(tools.Maybe(ctx.record, 'metadata')['oai_datacite'], 'type'),
tools.RunPython(
'text_list',
(tools.Concat(tools.Try(ctx.record.metadata['oai_datacite'].payload.resource.subjects.subject)))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If Concat was the problem for tags, it should be removed for the subjects as well (https://github.com/CenterForOpenScience/SHARE/pull/650/files#diff-bedec94698aaa5a42507c84db3ae44d1R549).

tools.Try(ctx.record.metadata['oai_datacite'].payload.resource.subjects.subject)
),
tools.Try(ctx.record.metadata['oai_datacite'].payload.resource.formats.format),
tools.Try(ctx.record.metadata['oai_datacite'].datacentreSymbol),
Expand Down