-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add emails for all ContactPersons in test data
- Loading branch information
1 parent
9a12bff
commit b90238f
Showing
2 changed files
with
15 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ | |
{ | ||
"schemaKey": "Person", | ||
"name": "Scala, Federico", | ||
"email": "[email protected]", | ||
"roleName": [ | ||
"dcite:DataCollector", | ||
"dcite:Author", | ||
|
@@ -150,6 +151,7 @@ | |
"schemaKey": "Person", | ||
"identifier": "0000-0002-4305-6376", | ||
"name": "Tolias, Andreas Savas", | ||
"email": "[email protected]", | ||
"roleName": [ | ||
"dcite:Author", | ||
"dcite:ContactPerson" | ||
|
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 |
---|---|---|
|
@@ -196,6 +196,7 @@ def test_datacite(dandi_id: str, schema: Any) -> None: | |
{ | ||
"name": "A_last, A_first", | ||
"roleName": [RoleType("dcite:ContactPerson")], | ||
"email": "[email protected]", | ||
"schemaKey": "Person", | ||
}, | ||
{ | ||
|
@@ -224,6 +225,7 @@ def test_datacite(dandi_id: str, schema: Any) -> None: | |
{ | ||
"name": "A_last, A_first", | ||
"roleName": [RoleType("dcite:ContactPerson")], | ||
"email": "[email protected]", | ||
"schemaKey": "Person", | ||
}, | ||
{ | ||
|
@@ -245,6 +247,7 @@ def test_datacite(dandi_id: str, schema: Any) -> None: | |
{ | ||
"name": "A_last, A_first", | ||
"roleName": [RoleType("dcite:ContactPerson")], | ||
"email": "[email protected]", | ||
"schemaKey": "Person", | ||
}, | ||
{ | ||
|
@@ -274,6 +277,7 @@ def test_datacite(dandi_id: str, schema: Any) -> None: | |
{ | ||
"name": "A_last, A_first", | ||
"roleName": [RoleType("dcite:ContactPerson")], | ||
"email": "[email protected]", | ||
"schemaKey": "Person", | ||
}, | ||
{ | ||
|
@@ -314,6 +318,7 @@ def test_datacite(dandi_id: str, schema: Any) -> None: | |
{ | ||
"name": "B_last, B_first", | ||
"roleName": [RoleType("dcite:ContactPerson")], | ||
"email": "[email protected]", | ||
"schemaKey": "Person", | ||
}, | ||
], | ||
|
@@ -391,6 +396,7 @@ def test_dandimeta_datacite( | |
|
||
dandi_id = metadata_basic["identifier"] | ||
dandi_id_noprefix = dandi_id.split(":")[1] | ||
from pprint import pprint | ||
|
||
metadata_basic.update(_basic_publishmeta(dandi_id=dandi_id_noprefix)) | ||
metadata_basic.update(additional_meta) | ||
|
@@ -401,6 +407,9 @@ def test_dandimeta_datacite( | |
validator = Draft7Validator(schema) | ||
validator.validate(datacite["data"]["attributes"]) | ||
|
||
pprint(datacite_checks) | ||
pprint(datacite) | ||
|
||
# checking some datacite fields | ||
attr = datacite["data"]["attributes"] | ||
for key, el in datacite_checks.items(): | ||
|
@@ -409,6 +418,10 @@ def test_dandimeta_datacite( | |
# checking length and some fields from the first element | ||
assert len(attr[key]) == el_len | ||
for k, v in el_flds.items(): | ||
print(k, v) | ||
pprint(attr[key][0]) | ||
# pprint(el_flds) | ||
# print() | ||
assert attr[key][0][k] == v | ||
else: | ||
if isinstance(el_flds, dict): | ||
|