Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7124551
D7318.id26753.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Subscribers
None
D7318.id26753.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
@@ -179,6 +179,20 @@
</entry>
""",
),
+ (
+ "author-two-names",
+ f"""\
+ <entry {XMLNS}>
+ <url>some url</url>
+ <codemeta:name>bar</codemeta:name>
+ <codemeta:author>
+ <codemeta:name>someone</codemeta:name>
+ <codemeta:name>an alias</codemeta:name>
+ </codemeta:author>
+ {PROVENANCE_XML}
+ </entry>
+ """,
+ ),
(
"codemeta-affiliation",
f"""\
@@ -275,6 +289,18 @@
<codemeta:name>University 2</codemeta:name>
</codemeta:affiliation>
</codemeta:contributor>
+ <codemeta:maintainer>
+ <codemeta:name>A Maintainer</codemeta:name>
+ <codemeta:affiliation>
+ <codemeta:name>University 3</codemeta:name>
+ </codemeta:affiliation>
+ </codemeta:maintainer>
+ <codemeta:copyrightHolder>
+ <codemeta:name>University 3</codemeta:name>
+ </codemeta:copyrightHolder>
+ <codemeta:creator>
+ <codemeta:name>A Maintainer</codemeta:name>
+ </codemeta:creator>
<codemeta:applicationCategory>something</codemeta:applicationCategory>
<codemeta:applicationSubCategory>something else</codemeta:applicationSubCategory>
<codemeta:installUrl>http://example.org/</codemeta:installUrl>
@@ -513,6 +539,28 @@
},
],
),
+ (
+ "maintainer-with-no-name",
+ f"""\
+ <entry {XMLNS}>
+ <url>some url</url>
+ <codemeta:name>bar</codemeta:name>
+ <codemeta:author>
+ <codemeta:name>should allow anything here</codemeta:name>
+ </codemeta:author>
+ <codemeta:maintainer>
+ <schema:unknown-tag>abc</schema:unknown-tag>
+ </codemeta:maintainer>
+ {PROVENANCE_XML}
+ </entry>
+ """,
+ [
+ {
+ "summary": ".*Tag '?codemeta:name'? expected.*",
+ "fields": ["codemeta:maintainer"],
+ },
+ ],
+ ),
(
"id-is-not-url",
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
@@ -20,10 +20,11 @@
<xsd:union memberTypes="xsd:date xsd:dateTime"/>
</xsd:simpleType>
- <xsd:element name="author" type="codemeta:PersonOrOrganization">
- </xsd:element>
- <xsd:element name="contributor" type="codemeta:PersonOrOrganization">
- </xsd:element>
+ <xsd:element name="author" type="codemeta:PersonOrOrganization" />
+ <xsd:element name="contributor" type="codemeta:PersonOrOrganization" />
+ <xsd:element name="copyrightHolder" type="codemeta:PersonOrOrganization" />
+ <xsd:element name="creator" type="codemeta:PersonOrOrganization" />
+ <xsd:element name="maintainer" type="codemeta:PersonOrOrganization" />
<xsd:complexType name="PersonOrOrganization">
<!-- Allows anything, but at least <codemeta:name> should be present.
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Dec 21 2024, 1:18 PM (11 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3229908
Attached To
D7318: Add more Person fields to the schema
Event Timeline
Log In to Comment