Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7124755
D7316.id26518.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Subscribers
None
D7316.id26518.diff
View Options
diff --git a/swh/deposit/tests/api/test_checks.py b/swh/deposit/tests/api/test_checks.py
--- a/swh/deposit/tests/api/test_checks.py
+++ b/swh/deposit/tests/api/test_checks.py
@@ -178,6 +178,22 @@
</entry>
""",
),
+ (
+ "codemeta-affiliation",
+ f"""\
+ <entry {XMLNS}>
+ <url>some url</url>
+ <codemeta:name>bar</codemeta:name>
+ <codemeta:author>
+ <codemeta:name>someone</codemeta:name>
+ <codemeta:affiliation>
+ <codemeta:name>My Orga</codemeta:name>
+ </codemeta:affiliation>
+ </codemeta:author>
+ {PROVENANCE_XML}
+ </entry>
+ """,
+ ),
(
"swh:add_to_origin",
f"""\
@@ -379,6 +395,26 @@
},
],
),
+ (
+ "chardata-in-affiliation",
+ f"""\
+ <entry {XMLNS}>
+ <url>some url</url>
+ <codemeta:name>bar</codemeta:name>
+ <codemeta:author>
+ <codemeta:name>someone</codemeta:name>
+ <codemeta:affiliation>My Orga</codemeta:affiliation>
+ </codemeta:author>
+ {PROVENANCE_XML}
+ </entry>
+ """,
+ [
+ {
+ "summary": ".*Reason: character data between child elements.*",
+ "fields": ["codemeta:author"],
+ },
+ ],
+ ),
(
"chardata-in-author",
f"""\
diff --git a/swh/deposit/xsd/codemeta.xsd b/swh/deposit/xsd/codemeta.xsd
--- a/swh/deposit/xsd/codemeta.xsd
+++ b/swh/deposit/xsd/codemeta.xsd
@@ -32,5 +32,10 @@
</xsd:all>
</xsd:complexType>
+ <!-- note that codemeta:affiliation expects Organization as value,
+ but https://codemeta.github.io/terms/ mistakenly documents it as Text.
+ See https://github.com/codemeta/codemeta/pull/239 -->
+ <xsd:element name="affiliation" type="codemeta:PersonOrOrganization" />
+
<xsd:element name="name" type="xsd:string" />
</xsd:schema>
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Dec 21 2024, 6:34 PM (11 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3225292
Attached To
D7316: Add <codemeta:affiliation> to the schema.
Event Timeline
Log In to Comment