From 96e38edde79735b4080ec08d57e9f54759e97b61 Mon Sep 17 00:00:00 2001 From: Martin Czygan Date: Thu, 2 Jan 2020 17:35:54 +0100 Subject: datacite: add conversion fixtures The `test_datacite_conversions` function will compare an input (datacite) document to an expected output (release entity as JSON). This way, it should not be too hard to add more cases by adding: input, output - and by increasing the counter in the range loop within the test. To view input and result side by side with vim, change into the test directory and run: tests/files/datacite $ ./caseview.sh 18 --- python/tests/files/datacite/datacite_doc_14.json | 166 +++++++++++++++++++++++ 1 file changed, 166 insertions(+) create mode 100644 python/tests/files/datacite/datacite_doc_14.json (limited to 'python/tests/files/datacite/datacite_doc_14.json') diff --git a/python/tests/files/datacite/datacite_doc_14.json b/python/tests/files/datacite/datacite_doc_14.json new file mode 100644 index 00000000..b1e1ebf2 --- /dev/null +++ b/python/tests/files/datacite/datacite_doc_14.json @@ -0,0 +1,166 @@ +{ + "id": "10.5517/cc7gns3", + "type": "dois", + "attributes": { + "doi": "10.5517/cc7gns3", + "identifiers": [ + { + "identifier": "https://doi.org/10.5517/cc7gns3", + "identifierType": "DOI" + }, + { + "identifier": "222635", + "identifierType": "CCDC" + } + ], + "creators": [ + { + "name": "Stulz, E.", + "nameType": "Personal", + "givenName": "E.", + "familyName": "Stulz", + "affiliation": [] + }, + { + "name": "Scott, S.M.", + "nameType": "Personal", + "givenName": "S.M.", + "familyName": "Scott", + "affiliation": [] + }, + { + "name": "Ng, Yiu-Fai", + "nameType": "Personal", + "givenName": "Yiu-Fai", + "familyName": "Ng", + "affiliation": [] + }, + { + "name": "Bond, A.D.", + "nameType": "Personal", + "givenName": "A.D.", + "familyName": "Bond", + "affiliation": [] + }, + { + "name": "Teat, S.J.", + "nameType": "Personal", + "givenName": "S.J.", + "familyName": "Teat", + "affiliation": [] + }, + { + "name": "Darling, S.L.", + "nameType": "Personal", + "givenName": "S.L.", + "familyName": "Darling", + "affiliation": [] + }, + { + "name": "Feeder, N.", + "nameType": "Personal", + "givenName": "N.", + "familyName": "Feeder", + "affiliation": [] + }, + { + "name": "Sanders, J.K.M.", + "nameType": "Personal", + "givenName": "J.K.M.", + "familyName": "Sanders", + "affiliation": [] + } + ], + "titles": [ + { + "title": "CCDC 222635: Experimental Crystal Structure Determination" + } + ], + "publisher": "Cambridge Crystallographic Data Centre", + "container": {}, + "publicationYear": 2004, + "subjects": [ + { + "subject": "Crystal Structure" + }, + { + "subject": "Experimental 3D Coordinates" + }, + { + "subject": "Crystal System" + }, + { + "subject": "Space Group" + }, + { + "subject": "Cell Parameters" + }, + { + "subject": "Crystallography" + }, + { + "subject": "bis(mu~2~-5-(3,5-Di-t-butylphenyl)-15-(4-(2-(diphenylphosphino)ethynyl)phenyl)-2,8,12,18-tetrahexyl-3,7,13,17-tetramethylporphyrinato)-(5,15-bis(3,5-di-t-butylphenyl)-2,8,12,18-tetraethyl-3,7,13,17-tetramethylporphyrinato)-di-nickel-ruthenium chloroform solvate" + } + ], + "contributors": [], + "dates": [ + { + "date": "2004", + "dateType": "Issued" + } + ], + "language": "eng", + "types": { + "ris": "DATA", + "bibtex": "misc", + "citeproc": "dataset", + "schemaOrg": "Dataset", + "resourceTypeGeneral": "Dataset" + }, + "relatedIdentifiers": [ + { + "relationType": "IsSupplementTo", + "relatedIdentifier": "10.1021/ic034699w", + "relatedIdentifierType": "DOI" + } + ], + "sizes": [], + "formats": [ + "CIF" + ], + "version": null, + "rightsList": [], + "descriptions": [ + { + "description": "Related Article: E.Stulz, S.M.Scott, Yiu-Fai Ng, A.D.Bond, S.J.Teat, S.L.Darling, N.Feeder, J.K.M.Sanders|2003|Inorg.Chem.|42|6564|doi:10.1021/ic034699w", + "descriptionType": "Other" + }, + { + "description": "An entry from the Cambridge Structural Database, the world’s repository for small molecule crystal structures. The entry contains experimental data from a crystal diffraction study. The deposited dataset for this entry is freely available from the CCDC and typically includes 3D coordinates, cell parameters, space group, experimental conditions and quality measures.", + "descriptionType": "Abstract" + } + ], + "geoLocations": [], + "fundingReferences": [], + "url": "http://www.ccdc.cam.ac.uk/services/structure_request?id=doi:10.5517/cc7gns3&sid=DataCite", + "contentUrl": null, + "metadataVersion": 2, + "schemaVersion": "http://datacite.org/schema/kernel-3", + "source": null, + "isActive": true, + "state": "findable", + "reason": null, + "created": "2014-03-18T07:28:28.000Z", + "registered": "2014-03-18T07:28:29.000Z", + "published": "2004", + "updated": "2019-08-02T03:38:32.000Z" + }, + "relationships": { + "client": { + "data": { + "id": "ccdc.csd", + "type": "clients" + } + } + } +} -- cgit v1.2.3