caltechdata-api 1.9.0__tar.gz → 1.9.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (21) hide show
  1. {caltechdata_api-1.9.0 → caltechdata_api-1.9.1}/PKG-INFO +1 -1
  2. {caltechdata_api-1.9.0 → caltechdata_api-1.9.1}/caltechdata_api/customize_schema.py +5 -21
  3. {caltechdata_api-1.9.0 → caltechdata_api-1.9.1}/caltechdata_api.egg-info/PKG-INFO +1 -1
  4. {caltechdata_api-1.9.0 → caltechdata_api-1.9.1}/LICENSE +0 -0
  5. {caltechdata_api-1.9.0 → caltechdata_api-1.9.1}/README.md +0 -0
  6. {caltechdata_api-1.9.0 → caltechdata_api-1.9.1}/caltechdata_api/__init__.py +0 -0
  7. {caltechdata_api-1.9.0 → caltechdata_api-1.9.1}/caltechdata_api/caltechdata_edit.py +0 -0
  8. {caltechdata_api-1.9.0 → caltechdata_api-1.9.1}/caltechdata_api/caltechdata_write.py +0 -0
  9. {caltechdata_api-1.9.0 → caltechdata_api-1.9.1}/caltechdata_api/cli.py +0 -0
  10. {caltechdata_api-1.9.0 → caltechdata_api-1.9.1}/caltechdata_api/download_file.py +0 -0
  11. {caltechdata_api-1.9.0 → caltechdata_api-1.9.1}/caltechdata_api/get_files.py +0 -0
  12. {caltechdata_api-1.9.0 → caltechdata_api-1.9.1}/caltechdata_api/get_metadata.py +0 -0
  13. {caltechdata_api-1.9.0 → caltechdata_api-1.9.1}/caltechdata_api/md_to_json.py +0 -0
  14. {caltechdata_api-1.9.0 → caltechdata_api-1.9.1}/caltechdata_api/utils.py +0 -0
  15. {caltechdata_api-1.9.0 → caltechdata_api-1.9.1}/caltechdata_api.egg-info/SOURCES.txt +0 -0
  16. {caltechdata_api-1.9.0 → caltechdata_api-1.9.1}/caltechdata_api.egg-info/dependency_links.txt +0 -0
  17. {caltechdata_api-1.9.0 → caltechdata_api-1.9.1}/caltechdata_api.egg-info/entry_points.txt +0 -0
  18. {caltechdata_api-1.9.0 → caltechdata_api-1.9.1}/caltechdata_api.egg-info/requires.txt +0 -0
  19. {caltechdata_api-1.9.0 → caltechdata_api-1.9.1}/caltechdata_api.egg-info/top_level.txt +0 -0
  20. {caltechdata_api-1.9.0 → caltechdata_api-1.9.1}/setup.cfg +0 -0
  21. {caltechdata_api-1.9.0 → caltechdata_api-1.9.1}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: caltechdata_api
3
- Version: 1.9.0
3
+ Version: 1.9.1
4
4
  Summary: Python wrapper for CaltechDATA API.
5
5
  Home-page: https://github.com/caltechlibrary/caltechdata_api
6
6
  Author: Thomas E Morrell, Bhattarai Rohan , Won Elizabeth
@@ -416,8 +416,11 @@ def validate_metadata(json_record):
416
416
 
417
417
  # Check for 'identifiers'
418
418
  if "identifiers" in json_record:
419
- if not isinstance(json_record["identifiers"], list):
420
- errors.append("'identifiers' should be a list.")
419
+ if (
420
+ not isinstance(json_record["identifiers"], list)
421
+ or len(json_record["identifiers"]) == 0
422
+ ):
423
+ errors.append("'identifiers' should be a non-empty list.")
421
424
  else:
422
425
  for identifier in json_record["identifiers"]:
423
426
  if (
@@ -490,25 +493,6 @@ def validate_metadata(json_record):
490
493
  ):
491
494
  errors.append("Each 'date' must have 'date' and 'dateType'.")
492
495
 
493
- # Check for 'identifiers'
494
- if "identifiers" not in json_record:
495
- errors.append("'identifiers' field is missing.")
496
- elif (
497
- not isinstance(json_record["identifiers"], list)
498
- or len(json_record["identifiers"]) == 0
499
- ):
500
- errors.append("'identifiers' should be a non-empty list.")
501
- else:
502
- for identifier in json_record["identifiers"]:
503
- if (
504
- not isinstance(identifier, dict)
505
- or "identifier" not in identifier
506
- or "identifierType" not in identifier
507
- ):
508
- errors.append(
509
- "Each 'identifier' must have 'identifier' and 'identifierType'."
510
- )
511
-
512
496
  # Check for 'creators'
513
497
  if "creators" not in json_record:
514
498
  errors.append("'creators' field is missing.")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: caltechdata-api
3
- Version: 1.9.0
3
+ Version: 1.9.1
4
4
  Summary: Python wrapper for CaltechDATA API.
5
5
  Home-page: https://github.com/caltechlibrary/caltechdata_api
6
6
  Author: Thomas E Morrell, Bhattarai Rohan , Won Elizabeth
File without changes