Skip to content

modifying annotation schema to match real world examples #765

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fcollman
Copy link
Contributor

I was attempting to build a set of helper functions to facilitate reading precomputed annotations using tensorstore, and I thought i'd utilize the jsonschemas in this repo to facilitate validation.

In starting to use them on a real world example such as "gs://neuroglancer-20191211_fafbv14_buhmann2019_li20190805"

i discovered this failed validation for a few reasons, some of which were clear errors, and others that were perhaps oversights or inconsistencies between neuroglancer and the written spec. I've modified the spec so that this info file passes validation in a way that I think makes sense but feedback is welcome.

@jbms
Copy link
Collaborator

jbms commented Apr 14, 2025

Thanks for bringing up these issues.

One issue is that the schemas are designed to serve both for validation but also for documentation.

The precomputed format generally allows "enums" to be case insensitive mostly because I was lazy when initially adding the support but I kind of wanted to discourage that going forward by only documenting them as lowercase.

Currently the json schema documentation generation in the sphinx-immaterial theme does not handle regexp patterns at all:

https://neuroglancer-docs--pr765-whh4irzt.web.app/datasource/precomputed/annotation.html#json-PrecomputedAnnotation.annotation_type

But even if it did, it would surely be less readable than with the enum. Not sure what the best solution there is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants