Skip to content

Commit

Permalink
RF: "upgrade" to datacite v4.5 jsonschema serialization, now from inv…
Browse files Browse the repository at this point in the history
…eniosoftware

Done in hope to see "non-standard" identifiers being gone but immediate fail is

	___ test_dandimeta_datacite[additional_meta6-datacite_checks6] _
	dandischema/tests/test_datacite.py:407: in test_dandimeta_datacite
		validator.validate(datacite["data"]["attributes"])
	venv/3/lib/python3.12/site-packages/jsonschema/validators.py:451: in validate
		raise error
	E   jsonschema.exceptions.ValidationError: 'DANDI Archive' is not of type 'object'
	E
	E   Failed validating 'type' in schema['properties']['publisher']:
	E       {'type': 'object',
	E        'additionalProperties': False,
	E        'properties': {'name': {'type': 'string'},
	E                       'publisherIdentifier': {'type': 'string'},
	E                       'publisherIdentifierScheme': {'type': 'string'},
	E                       'schemeUri': {'type': 'string', 'format': 'uri'},
	E                       'lang': {'type': 'string'}},
	E        'required': ['name']}
	E
	E   On instance['publisher']:
	E       'DANDI Archive'

So we need to standardize "publisher" better
  • Loading branch information
yarikoptic committed Nov 12, 2024
1 parent f101d66 commit 2095d3e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dandischema/datacite/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ def to_datacite(


@lru_cache()
def _get_datacite_schema(version_id: str = "datacite-4.3-17-gaa5db56") -> Any:
def _get_datacite_schema(version_id: str = "inveniosoftware-4.5-81-g160250d") -> Any:
"""Load datacite schema based on the version id provided."""
schema_folder = Path(__file__).parent / "schema"
return json.loads((schema_folder / f"{version_id}.json").read_text())
Expand Down

0 comments on commit 2095d3e

Please sign in to comment.