Dcat oai #1718
Closed
Dcat oai #1718
Annotations
6 errors and 2 warnings
Run tests:
tests/resources/serializers/test_datacite_serializer.py#L253
test_datacite43_serializer
assert {'contributor...Other'}], ...} == {'contributor... 'eng'}], ...}
Omitting 16 identical items, use -vv to show
Differing items:
{'creators': [{'affiliation': [{'name': 'CERN'}, {'name': 'free-text'}], 'familyName': 'Nielsen', 'givenName': 'Lars H...en, Lars Holm', ...}, {'familyName': 'Tom', 'givenName': 'Blabin', 'name': 'Tom, Blabin', 'nameIdentifiers': [], ...}]} != {'creators': [{'affiliation': [{'name': 'CERN'}, {'name': 'free-text'}], 'familyName': 'Nielsen', 'givenName': 'Lars H...en, Lars Holm', ...}, {'familyName': 'Tom', 'givenName': 'Blabin', 'name': 'Tom, Blabin', 'nameIdentifiers': [], ...}]}
{'contributors': [{'affiliation': [{'name': 'CERN'}, {'name': 'TU Wien'}], 'contributorType': 'Other', 'familyName': '...s Holm', ...}, {'contributorType': 'Other', 'familyName': 'Dirk', 'givenName': 'Dirkin', 'name': 'Dirk, Dirkin', ...}]} != {'contributors': [{'affiliation': [{'name': 'CERN'}, {'name': 'TU Wien'}], 'contributorType': 'Other', 'familyName': '...s Holm', ...}, {'contributorType': 'Other', 'familyName': 'Dirk', 'givenName': 'Dirkin', 'name': 'Dirk, Dirkin', ...}]}
{'descriptions': [{'description': 'A description \nwith HTML tags', 'descriptionType': 'Abstract'}, {'description': 'B...Type': 'Methods', 'lang': 'eng'}, {'description': '{"references": ["Nielsen et al,.."]}', 'descriptionType': 'Other'}]} != {'descriptions': [{'description': 'A description \nwith HTML tags', 'descriptionType': 'Abstract'}, {'description': 'Bla bla bla', 'descriptionType': 'Methods', 'lang': 'eng'}]}
Full diff:
{
'contributors': [{'affiliation': [{'name': 'CERN'},
{'name': 'TU Wien'}],
'contributorType': 'Other',
'familyName': 'Nielsen',
'givenName': 'Lars Holm',
'name': 'Nielsen, Lars Holm',
'nameIdentifiers': [{'nameIdentifier': '0000-0001-8135-3489',
- 'nameIdentifierScheme': 'ORCID'}],
? --
+ 'nameIdentifierScheme': 'ORCID',
+ 'schemeUri': 'http://orcid.org/'}],
'nameType': 'Personal'},
{'contributorType': 'Other',
'familyName': 'Dirk',
'givenName': 'Dirkin',
'name': 'Dirk, Dirkin',
'nameIdentifiers': [],
'nameType': 'Personal'}],
'creators': [{'affiliation': [{'name': 'CERN'},
{'name': 'free-text'}],
'familyName': 'Nielsen',
'givenName': 'Lars Holm',
'name': 'Nielsen, Lars Holm',
'nameIdentifiers': [{'nameIdentifier': '0000-0001-8135-3489',
- 'nameIdentifierScheme': 'ORCID'}],
? --
+ 'nameIdentifierScheme': 'ORCID',
+ 'schemeUri': 'http://orcid.org/'}],
'nameType': 'Personal'},
{'familyName': 'Tom',
'givenName': 'Blabin',
'name': 'Tom, Blabin',
'nameIdentifiers': [],
'nameType': 'Personal'}],
'dates': [{'date': '2018/2020-09',
'dateType': 'Issued'},
{'date': '1939/1945',
'dateInformation': 'A date',
'dateType': 'Other'},
{'date': '2023-11-14',
'dateType': 'Updated'}],
'descriptions': [{'description': 'A description \n'
'with HTML tags',
'descriptionType': 'Abstract'},
{'description': 'Bla bla bla',
'descriptionType': 'Methods',
- 'lan
|
Run tests:
tests/resources/serializers/test_datacite_serializer.py#L373
test_datacite43_xml_serializer
assert '<?xml versio...</resource>\n' == '<?xml versio...</resource>\n'
Skipping 927 identical leading characters in diff, use -v to show
- me="ORCID">0000-0001-8135-3489</nameIdentifier>
+ me="ORCID" schemeURI="http://orcid.org/">0000-0001-8135-3489</nameIdentifier>
? ++++++++++++++++++++++++++++++
<affiliation>CERN</affiliation>
<affiliation>free-text</affiliation>
</creator>
<creator>
<creatorName nameType="Personal">Tom, Blabin</creatorName>
<givenName>Blabin</givenName>
<familyName>Tom</familyName>
</creator>
</creators>
<titles>
<title>InvenioRDM</title>
<title xml:lang="eng" titleType="Subtitle">a research data management platform</title>
</titles>
<publisher>InvenioRDM</publisher>
<publicationYear>2018</publicationYear>
<subjects>
<subject subjectScheme="MeSH">Abdominal Injuries</subject>
<subject>custom</subject>
</subjects>
<contributors>
<contributor contributorType="Other">
<contributorName nameType="Personal">Nielsen, Lars Holm</contributorName>
<givenName>Lars Holm</givenName>
<familyName>Nielsen</familyName>
- <nameIdentifier nameIdentifierScheme="ORCID">0000-0001-8135-3489</nameIdentifier>
+ <nameIdentifier nameIdentifierScheme="ORCID" schemeURI="http://orcid.org/">0000-0001-8135-3489</nameIdentifier>
? ++++++++++++++++++++++++++++++
<affiliation>CERN</affiliation>
<affiliation>TU Wien</affiliation>
</contributor>
<contributor contributorType="Other">
<contributorName nameType="Personal">Dirk, Dirkin</contributorName>
<givenName>Dirkin</givenName>
<familyName>Dirk</familyName>
</contributor>
</contributors>
<dates>
<date dateType="Issued">2018/2020-09</date>
<date dateType="Other" dateInformation="A date">1939/1945</date>
<date dateType="Updated">2023-11-14</date>
</dates>
<language>dan</language>
<resourceType resourceTypeGeneral="Image">Photo</resourceType>
<relatedIdentifiers>
<relatedIdentifier relatedIdentifierType="DOI" relationType="IsCitedBy" resourceTypeGeneral="Dataset">10.1234/foo.bar</relatedIdentifier>
<relatedIdentifier relatedIdentifierType="DOI" relationType="IsVersionOf">10.1234/pgfpj-at058</relatedIdentifier>
</relatedIdentifiers>
<sizes>
<size>11 pages</size>
</sizes>
<formats>
<format>application/pdf</format>
</formats>
<version>v1.0</version>
<rightsList>
<rights rightsURI="https://customlicense.org/licenses/by/4.0/">A custom license</rights>
<rights rightsURI="https://creativecommons.org/licenses/by/4.0/legalcode" rightsIdentifierScheme="spdx" rightsIdentifier="cc-by-4.0">Creative Commons Attribution 4.0 International</rights>
</rightsList>
<descriptions>
<description descriptionType="Abstract">A description
with HTML tags</description>
<description descriptionType="Methods" xml:lang="eng">Bla bla bla</description>
+ <description descriptionType="Other">{"references": ["Nielsen et al,.."]}</description>
</descriptions>
<geoLocations>
<geoLocation>
<geoLocationPlace>test location place</geoLocationPlace>
<geoLocationPoint>
<pointLongitude>-32.94682</pointLongitude>
<pointLatitude>-60.63932</pointLatitude>
</geoLocationPoint>
</geoLocation>
</geoLocations>
<fundingReferences>
<fundingReference>
<funderName>European Commission</funderName>
<awardNumber>111023</awardNumber>
<awardTitle>Launching of the research program on meaning processing</awardTitle>
</fundingReference>
</fundingReferences>
</resource>
|
Run tests:
tests/resources/serializers/test_dcat_serializer.py#L239
test_dcat_serializer
assert '<?xml versio...n</rdf:RDF>\n' == '<?xml versio...n</rdf:RDF>\n'
Skipping 1359 identical leading characters in diff, use -v to show
+ <dct:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#string">0000-0001-8135-3489</dct:identifier>
<foaf:name>Nielsen, Lars Holm</foaf:name>
<foaf:givenName>Lars Holm</foaf:givenName>
<foaf:familyName>Nielsen</foaf:familyName>
<org:memberOf>
<foaf:Organization>
<foaf:name>CERN</foaf:name>
</foaf:Organization>
</org:memberOf>
<org:memberOf>
<foaf:Organization>
<foaf:name>free-text</foaf:name>
</foaf:Organization>
</org:memberOf>
</rdf:Description>
</dct:creator>
<dct:creator>
<rdf:Description>
<rdf:type rdf:resource="http://xmlns.com/foaf/0.1/Person"/>
<foaf:name>Tom, Blabin</foaf:name>
<foaf:givenName>Blabin</foaf:givenName>
<foaf:familyName>Tom</foaf:familyName>
</rdf:Description>
</dct:creator>
<dct:title>InvenioRDM</dct:title>
<dct:publisher>
<foaf:Agent>
<foaf:name>InvenioRDM</foaf:name>
</foaf:Agent>
</dct:publisher>
<dct:issued rdf:datatype="http://www.w3.org/2001/XMLSchema#gYear">2018</dct:issued>
<dct:subject>
<skos:Concept>
<skos:prefLabel>Abdominal Injuries</skos:prefLabel>
<skos:inScheme>
<skos:ConceptScheme>
<dct:title>MeSH</dct:title>
</skos:ConceptScheme>
</skos:inScheme>
</skos:Concept>
</dct:subject>
<dcat:keyword>custom</dcat:keyword>
<citedcat:isFundedBy>
<foaf:Project>
<dct:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#string">111023</dct:identifier>
<dct:title>Launching of the research program on meaning processing</dct:title>
<citedcat:isAwardedBy>
<foaf:Organization>
<dct:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#string"/>
<foaf:name>European Commission</foaf:name>
</foaf:Organization>
</citedcat:isAwardedBy>
</foaf:Project>
</citedcat:isFundedBy>
<citedcat:funder>
<foaf:Organization>
<dct:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#string"/>
<foaf:name>European Commission</foaf:name>
</foaf:Organization>
</citedcat:funder>
<dct:contributor>
<rdf:Description rdf:about="https://orcid.org/0000-0001-8135-3489">
<rdf:type rdf:resource="http://xmlns.com/foaf/0.1/Person"/>
+ <dct:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#string">0000-0001-8135-3489</dct:identifier>
<foaf:name>Nielsen, Lars Holm</foaf:name>
<foaf:givenName>Lars Holm</foaf:givenName>
<foaf:familyName>Nielsen</foaf:familyName>
<org:memberOf>
<foaf:Organization>
<foaf:name>CERN</foaf:name>
</foaf:Organization>
</org:memberOf>
<org:memberOf>
<foaf:Organization>
<foaf:name>TU Wien</foaf:name>
</foaf:Organization>
</org:memberOf>
</rdf:Description>
</dct:contributor>
<dct:contributor>
<rdf:Description>
<rdf:type rdf:resource="http://xmlns.com/foaf/0.1/Person"/>
<foaf:name>Dirk, Dirkin</foaf:name>
<foaf:givenName>Dirkin</foaf:givenName>
<foaf:familyName>Dirk</foaf:familyName>
</rdf:Description>
</dct:contributor>
<dct:issued rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2018/2020-09</dct:issued>
<dct:date rdf:datatype="http://www.w3.org/2001/XMLSchema#date">1939/1945</dct:date>
<dct:modified rdf:datatype="htt
|
Run tests:
tests/services/pids/test_pids_tasks.py#L582
test_full_record_register
AssertionError: Calls not found.
Expected: [call(metadata={'contributors': [{'affiliation': [{'affiliationIdentifier': 'https://ror.org/01ggx4157', 'affiliationIdentifierScheme': 'ROR', 'name': 'CERN'}], 'contributorType': 'Other', 'familyName': 'Nielsen', 'givenName': 'Lars Holm', 'name': 'Nielsen, Lars Holm', 'nameIdentifiers': [{'nameIdentifier': '0000-0001-8135-3489', 'nameIdentifierScheme': 'ORCID'}], 'nameType': 'Personal'}], 'creators': [{'affiliation': [{'affiliationIdentifier': 'https://ror.org/01ggx4157', 'affiliationIdentifierScheme': 'ROR', 'name': 'CERN'}, {'name': 'free-text'}], 'familyName': 'Nielsen', 'givenName': 'Lars Holm', 'name': 'Nielsen, Lars Holm', 'nameIdentifiers': [{'nameIdentifier': '0000-0001-8135-3489', 'nameIdentifierScheme': 'ORCID'}], 'nameType': 'Personal'}], 'dates': [{'date': '2018/2020-09', 'dateType': 'Issued'}, {'date': '1939/1945', 'dateInformation': 'A date', 'dateType': 'Other'}], 'descriptions': [{'description': 'A description \nwith HTML tags', 'descriptionType': 'Abstract'}, {'description': 'Bla bla bla', 'descriptionType': 'Methods', 'lang': 'eng'}], 'formats': ['application/pdf'], 'fundingReferences': [{'awardNumber': '755021', 'awardTitle': 'Personalised Treatment For Cystic Fibrosis Patients With Ultra-rare CFTR Mutations (and beyond)', 'awardURI': 'https://cordis.europa.eu/project/id/755021', 'funderIdentifier': '00k4n6c32', 'funderIdentifierType': 'ROR', 'funderName': 'European Commission'}], 'geoLocations': [{'geoLocationPlace': 'test location place', 'geoLocationPoint': {'pointLatitude': '-60.63932', 'pointLongitude': '-32.94682'}}], 'identifiers': [{'identifier': '10.1234/sewc8-en681', 'identifierType': 'DOI'}, {'identifier': '1924MNRAS..84..308E', 'identifierType': 'bibcode'}], 'language': 'dan', 'publicationYear': '2018', 'publisher': 'InvenioRDM', 'relatedIdentifiers': [{'relatedIdentifier': '10.1234/foo.bar', 'relatedIdentifierType': 'DOI', 'relationType': 'IsCitedBy', 'resourceTypeGeneral': 'Dataset'}], 'rightsList': [{'rights': 'A custom license', 'rightsUri': 'https://customlicense.org/licenses/by/4.0/'}, {'rights': 'Creative Commons Attribution 4.0 International', 'rightsIdentifier': 'cc-by-4.0', 'rightsIdentifierScheme': 'spdx', 'rightsUri': 'https://creativecommons.org/licenses/by/4.0/legalcode'}], 'schemaVersion': 'http://datacite.org/schema/kernel-4', 'sizes': ['11 pages'], 'subjects': [{'subject': 'Abdominal Injuries', 'subjectScheme': 'MeSH', 'valueURI': 'http://id.nlm.nih.gov/mesh/A-D000007'}, {'subject': 'custom'}], 'titles': [{'title': 'InvenioRDM'}, {'lang': 'eng', 'title': 'a research data management platform', 'titleType': 'Subtitle'}], 'types': {'resourceType': 'Photo', 'resourceTypeGeneral': 'Image'}, 'version': 'v1.0'}, url='https://127.0.0.1:5000/doi/10.1234/sewc8-en681', doi='10.1234/sewc8-en681')]
Actual: [call(metadata={'types': {'resourceTypeGeneral': 'Image', 'resourceType': 'Photo'}, 'titles': [{'title': 'A Romans story'}], 'creators': [{'name': 'Brown, Troy', 'nameType': 'Personal', 'givenName': 'Troy', 'familyName': 'Brown', 'nameIdentifiers': []}, {'name': 'Troy Inc.', 'nameType': 'Organizational', 'nameIdentifiers': []}], 'publisher': 'Acme Inc', 'publicationYear': '2020', 'dates': [{'date': '2020-06-01', 'dateType': 'Issued'}], 'identifiers': [{'identifier': '10.1234/rw04s-y9850', 'identifierType': 'DOI'}], 'schemaVersion': 'http://datacite.org/schema/kernel-4'}, url='https://127.0.0.1:5000/doi/10.1234/rw04s-y9850', doi='10.1234/rw04s-y9850'),
call(metadata={'types': {'resourceTypeGeneral': 'Image', 'resourceType': 'Photo'}, 'titles': [{'title': 'A Romans story'}], 'creators': [{'name': 'Brown, Troy', 'nameType': 'Personal', 'givenName': 'Troy', 'familyName': 'Brown', 'nameIdentifiers': []}, {'name': 'Troy Inc.', 'nameType': 'Organizational', 'nameIdentifiers': []}], 'publisher': 'Acme Inc', 'publicationYear': '2020', 'dates': [{'date': '2020-06-01', 'dateType': 'Issued'}], 'identifiers': [{'identifier': '10.1234/4mzwg-30c20', 'identifierType': 'DOI'}, {'identifier': 'oai:inveniordm:4mzwg-30c20', 'identifi
|
Run tests:
invenio_rdm_records/resources/serializers/datacite/schema.py#L1
isort-check
# it under the terms of the MIT License; see LICENSE file for more details.
"""DataCite based Schema for Invenio RDM Records."""
+
+import json
from babel_edtf import parse_edtf
from edtf.parser.grammar import ParseException
from marshmallow import Schema, ValidationError, fields, missing, post_dump, validate
from marshmallow_utils.fields import SanitizedUnicode
from marshmallow_utils.html import strip_html
-import json
+
from ....proxies import current_rdm_records_service
from ...serializers.ui.schema import current_default_locale
from ..utils import get_preferred_identifier, get_vocabulary_props
|
Run tests
Process completed with exit code 1.
|
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Loading