Skip to content

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