-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Validate citation metadata #525
Comments
Problem with metadata['citation']A single
So for Metadata templateI want to use the for key, value in METADATA_TEMPLATE.items():
assert key in atlas.metadata, f"Missing key: {key}"
assert isinstance(atlas.metadata[key], type(value)), (
f"Key '{key}' should be of type {type(value).__name__}, "
f"but got {type(atlas.metadata[key]).__name__}."
) However there are several isseus with the METADATA_TEMPLATE = {
"name": "name/author/institute_species_[optionalspecs]",
"citation": "Someone et al 2020, https://doi.org/somedoi",
"atlas_link": "http://www.example.com",
"species": "Gen species",
"symmetric": False,
"resolution": (1.0, 1.0, 1.0),
"orientation": "asr",
"shape": (100, 50, 100),
"version": "0.0",
"additional_references": [],
} I suggest changing it to something like this: METADATA_TEMPLATE = {
"name": "source_species_additional-info",
"citation": {"Someone et. al., 2020": "https://doi.org/somedoi"},
"atlas_link": "http://www.template_brain_atlas_link.com",
"species": "animal",
"symmetric": False,
"resolution": [1.0, 1.0, 1.0],
"orientation": "asr",
"shape": [100, 50, 100],
"version": "0.0",
~~"additional_references": {"ref1":"doi1","ref2":"doi2"},~~
"additional_references": [],
} Here all references / citations are dictionaries with note: maybe I do not understand additional_references very well, they seem more like keywords. Another, maybe easier (?), option is to keep the citation a single string and assume the doi always starts with "https://doi" (which is the currently accepted standard). |
The citation metadata does not have the right format for the
nadkarni_mri_mouselemur_91um
atlas.Results in a
ValueError
because citation metadata of this particular atlas doesn't have expected format (str
instead ofstr, str
).The citation metadata for this atlas is
"https://doi.org/10.1016/j.dib.2018.10.067"
, while I understood from @alessandrofelder it should follow a strict format and be something like"Natkarni et al., 2019", "https://doi.org/10.1016/j.dib.2018.10.067"
.@alessandrofelder and myself discussed taking the following steps:
brainglobe_atlasapi\atlas_generation\validate_atlases.py
brainglobe_atlasapi\atlas_generation\atlas_scripts
and add missing metadataThe text was updated successfully, but these errors were encountered: