Skip to content

Commit 5ee6a6c

Browse files
committed
Better test organization
1 parent 8130573 commit 5ee6a6c

32 files changed

+8673
-3763
lines changed

caltechdata_api/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
from .caltechdata_edit import (caltechdata_add, caltechdata_edit,
2-
caltechdata_unembargo)
31
from .caltechdata_write import caltechdata_write, send_s3
2+
from .caltechdata_edit import caltechdata_add, caltechdata_edit, caltechdata_unembargo
43
from .customize_schema import customize_schema
54
from .decustomize_schema import decustomize_schema
65
from .get_metadata import get_metadata

caltechdata_api/customize_schema.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def customize_schema_43(json_record):
8282
# Extract identifiers and label as DOI or alternativeIdentifiers
8383
if "identifiers" in json_record:
8484
alt = []
85-
for identifier = json_record["identifiers"]:
85+
for identifier in json_record["identifiers"]:
8686
if identifier['identifierType'] == 'DOI':
8787
json_record["doi"] = identifier
8888
else:
@@ -153,7 +153,7 @@ def customize_schema_43(json_record):
153153
json_record["contributors"] = newc
154154

155155

156-
def customize_standard(json_record)
156+
def customize_standard(json_record):
157157

158158
# Extract subjects to single string
159159
if "subjects" in json_record:

caltechdata_api/decustomize_schema.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ def decustomize_schema_43(json_record, pass_emails, pass_media, pass_owner):
214214
identifiers.append({
215215
"alternateIdentifier": json_record["pid_value"],
216216
"alternateIdentifierType": "CaltechDATA_Identifier",
217-
}
217+
})
218218
if "alternateIdentifiers" in json_record:
219219
for altid in json_record["alternateIdentifiers"]:
220220
if altid["alternateIdentifierType"] != "CaltechDATA_Identifier":

run-tests.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
pydocstyle datacite && \
2-
isort -rc -c -df **/*.py && \
32
pytest tests
Binary file not shown.

0 commit comments

Comments
 (0)