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 4, 2024
1 parent 610ac77 commit 8aebc6d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions dandischema/datacite.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,12 @@ def to_datacite(

def _get_datacite_schema() -> Any:
sr = requests.get(
"https://raw.githubusercontent.com/datacite/schema/"
"732cc7ef29f4cad4d6adfac83544133cd57a2e5e/"
"source/json/kernel-4.3/datacite_4.3_schema.json"
# "https://raw.githubusercontent.com/datacite/schema/"
# "732cc7ef29f4cad4d6adfac83544133cd57a2e5e/"
# "source/json/kernel-4.3/datacite_4.3_schema.json"
"https://raw.githubusercontent.com/inveniosoftware/datacite/"
"160250d6c7ebd39f24c93aa5dfdb4dea3169754b/"
"datacite/schemas/datacite-v4.5.json"
)
sr.raise_for_status()
schema = sr.json()
Expand Down

0 comments on commit 8aebc6d

Please sign in to comment.