-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add support for dct:identifier in publisher details
- Loading branch information
Hans-Chrstian
committed
Sep 9, 2024
1 parent
cde864e
commit aefa22c
Showing
11 changed files
with
102 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -647,6 +647,7 @@ def test_publisher_foaf(self): | |
<foaf:mbox>[email protected]</foaf:mbox> | ||
<foaf:homepage>http://some.org</foaf:homepage> | ||
<dct:type rdf:resource="http://purl.org/adms/publishertype/NonProfitOrganisation"/> | ||
<dct:identifier rdf:resource="https://ror.org/05wg1m734"/> | ||
</foaf:Organization> | ||
</dct:publisher> | ||
</rdfs:SomeClass> | ||
|
@@ -666,6 +667,7 @@ def test_publisher_foaf(self): | |
assert publisher['email'] == '[email protected]' | ||
assert publisher['url'] == 'http://some.org' | ||
assert publisher['type'] == 'http://purl.org/adms/publishertype/NonProfitOrganisation' | ||
assert publisher['identifier'] == 'https://ror.org/05wg1m734' | ||
|
||
def test_publisher_ref(self): | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -113,6 +113,7 @@ def _get_extra_value_as_list(key): | |
assert _get_extra_value('publisher_email') == '[email protected]' | ||
assert _get_extra_value('publisher_url') == 'http://some.org' | ||
assert _get_extra_value('publisher_type') == 'http://purl.org/adms/publishertype/NonProfitOrganisation' | ||
assert _get_extra_value('publisher_identifier') == 'https://ror.org/05wg1m734' | ||
assert _get_extra_value('contact_name') == 'Point of Contact' | ||
# mailto gets removed for storage and is added again on output | ||
assert _get_extra_value('contact_email') == '[email protected]' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -105,6 +105,7 @@ def test_publisher_extras(self): | |
{'key': 'publisher_email', 'value': '[email protected]'}, | ||
{'key': 'publisher_url', 'value': 'http://example.com/publisher/home'}, | ||
{'key': 'publisher_type', 'value': 'http://purl.org/adms/publishertype/Company'}, | ||
{'key': 'publisher_identifier', 'value': 'https://ror.org/05wg1m734'}, | ||
] | ||
|
||
|
||
|
@@ -121,6 +122,7 @@ def test_publisher_extras(self): | |
assert str(publisher) == extras['publisher_uri'] | ||
assert self._triple(g, publisher, RDF.type, SCHEMA.Organization) | ||
assert self._triple(g, publisher, SCHEMA.name, extras['publisher_name']) | ||
assert self._triple(g, publisher, SCHEMA.identifier, extras['publisher_identifier']) | ||
|
||
contact_point = self._triple(g, publisher, SCHEMA.contactPoint, None)[2] | ||
assert contact_point | ||
|
@@ -144,6 +146,7 @@ def test_publisher_no_uri(self): | |
{'key': 'publisher_email', 'value': '[email protected]'}, | ||
{'key': 'publisher_url', 'value': 'http://example.com/publisher/home'}, | ||
{'key': 'publisher_type', 'value': 'http://purl.org/adms/publishertype/Company'}, | ||
{'key': 'publisher_identifier', 'value': 'https://ror.org/05wg1m734'}, | ||
] | ||
} | ||
extras = self._extras(dataset) | ||
|
@@ -158,6 +161,7 @@ def test_publisher_no_uri(self): | |
assert isinstance(publisher, BNode) | ||
assert self._triple(g, publisher, RDF.type, SCHEMA.Organization) | ||
assert self._triple(g, publisher, SCHEMA.name, extras['publisher_name']) | ||
assert self._triple(g, publisher, SCHEMA.identifier, extras['publisher_identifier']) | ||
|
||
contact_point = self._triple(g, publisher, SCHEMA.contactPoint, None)[2] | ||
assert contact_point | ||
|
Oops, something went wrong.