-
Notifications
You must be signed in to change notification settings - Fork 6
Configure joint webpage layout for spec/examples/schemas #4
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
Configure joint webpage layout for spec/examples/schemas #4
Conversation
|
Worth noting that json-schema-for-humans is a couple of drafts out of date. The differences in JSON Schema are probably not major, for our purposes, but it makes me think twice about it - draft 7 was made obsolete in 2019. I'd also be concerned about duplicating information/ having two sources of truth when it comes to the prose vs the description fields in the JSON Schema - already the case to an extent, of course. Another question - is this layout still amenable to the existing model of ome/ngff representing the "landing page" and then the contents of this repo being just the spec? I think originally there were no build-related files in here, but there are in this change. |
|
At a glace looks really nice ✨ ! One quick immediate thought: Jupyter book 1.x is no longer undergoing active development, so you may be better switching to Jupyter book 2.x straight away, even if it is in beta. I did this at https://heftie-textbook.readthedocs.io/en/latest/ and it's working well |
|
Hey there, thanks for looking into it. I wasn't aware of the updates in json in the last few years, there's also been some discussion over at jsonschema-for-humans on the matter. For now, I'm jus ttrying to recreate the currently existing content of the ngff ewbpage - although the schema pages are veeeeery well hidden there. Would also be glad for a pointer to a more state-of-the-art tool to spawn readable schema artifacts as markdown files. I'm looking into jsonschema_markdown and sphinx-jsonschema atm. Edit: Just checked, a very widely used tool (jsonschema2md) apparently also only support json schema standards up until the 2019 revision. With that as a reference I think that'd be good enough for me. I would have liked the jsonschema sphinx directive as well. The vocabulary there is even older, so meh, but may be worth exploring whether it may do the trick for us, still. |
|
@dstansby I just upgraded to Jupyter-book and it looks super-neat! I can't seem to get the version: 2
build:
os: ubuntu-22.04
tools:
python: "3.13"
nodejs: "22"
jobs:
post_install:
- pip install -r docs/requirements.txt
pre_build:
# Generate the Sphinx configuration for this Jupyter Book so it builds.
- "python ./docs/pre_build.py"
build:
html:
- jupyter book build --html --execute --strict --ci
- mkdir -p $READTHEDOCS_OUTPUT/html
- cp -r _build/html/* $READTHEDOCS_OUTPUT/html/Edit: Ok, I think I'll just go ahead and merge this for the time being - upgrading to Jupyter book 2 can come in a separate PR. |
will-moore
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great GFI! 🚀
|
2019 is only one draft behind (even though it's only a year more recent than json-schema-for-humans). This is what happens when specifications don't reach 1.0, I guess 😬 |
move build output to special readthedocs folder fix dependency name moved package installation into post_install field correctly configure uv scrape uv use correct output path correct output path Update .readthedocs.yaml change build path Update .readthedocs.yaml Reorganize repo revert autodocs config Update .readthedocs.yaml Update .readthedocs.yaml specified output dir revert autodoc config
639ef3a to
8eb5eab
Compare
This reverts commit 8eb5eab.
* upgrade to Jupyter book 2 * correctly mark examples * bump mystmd dependency * pin mystmd * hashpin template * remove legacy dependencies * Create README.md for OME-NGFF specification * remove legacy files * use auto-built footer for copyright * Update `coordinateSystems` metadata * Updated `axes` metadata and moved under `coordinateSystems` header level * Update array coordinate systems metadata and merge existing examples * Update coordinate convention metadata * Updated coordinate transformations metadata * updated matrix transformations * update transformation types * update transformation types metadata * harmonize link syntax * removed deprecated statement about `byDimension` transform * harmonized indendations and json style * fixed `byDimension` metadata * make examples collapsible * renamed example folder * add orcid logo to editor info * fix reference * change precedence See discussion [here](bogovicj/ngff-rfc5-coordinate-transformation-examples#11 (comment)) * added examples for transformations with discrete axes * fix link to example * untrack autogenerated files * update affine examples and fix variable ordering * Fixed scale examples * removed example from additional details * specify affines/rotations as 2D matrices in parameter table * renamed coordinate transformations schema * Refactor rotation property to use `mtxFlatOrNested` * Delete schemas.md * remove `mtxFloatOrNested` affine/rotation matrices should always be 2D * "zarr array" instead of "binary data" * WIP: Update rfc5 schemas (#1) I'm merging this so that all necessary changes regarding the addition of rfc5-stuff to the main branch of the ngff-spec repo can be in one place. This branch was supposed to be a break-out to keep the commit-history of #17 clean. * Update input/output to input_axes/output_axes in schema * Add description and required field to byDimension * Update mapAxis schema to use integer array * Add path and interpolation to displacements schema The displacements object now includes a required 'path' property for specifying the zarr array location and an 'interpolation' property with supported methods. This enhances the schema's ability to describe displacement fields and their application. * Add path and interpolation to coordinates schema Introduces 'path' and 'interpolation' properties to the 'coordinates' object in the schema, specifying the location of the coordinate field and the interpolation method to use. The 'path' property is now required. * only allow paths, no URLs * move required fields to correct places * name musnt't be empty * added axis types to schema * Added descriptions to schemas * updated versions to 0.6dev2 * fix paths and versions * pull schema from correct location * Added action to run the tests * update config reference * update versions in test suite * Revert "update config reference" This reverts commit ff3fedd. * update all version references to "0.6dev2" * update version reference * at least two spatial axes * allow any axis type * update version reference * Add maxItems constraint to axes schema Set a maximum of 5 items for the axes array in the schema to enforce limits on the number of axes allowed. * Refactor image schema for coordinate transformations Refactors the definition of coordinateTransformations and coordinateSystems to use inline array schemas with stricter constraints. Adds a new multiscale_coordinateTransformations definition to support scale and translate transformations for multiscale datasets. * Update to NGFF 0.6dev2 and refactor coordinate systems Updated example and test JSON files to use the NGFF 0.6dev2 specification. Replaced 'axes' with 'coordinateSystems', added explicit 'input' and 'output' fields to coordinateTransformations, and restructured transformation chains for clarity and compliance with the new spec. * fix schema resolution * sync PR with latest RFC5 proposal (#2) Co-authored-by: Will Moore <900055+will-moore@users.noreply.github.com> Co-authored-by: David Stansby <d.stansby@ucl.ac.uk> Co-authored-by: Davis Bennett <davis.v.bennett@gmail.com> * fix links * fix schema resolution * split tests into separate files; add conformance test script * Conformance testing docs Also minor refactor test_validation * Add $schema to strict schemas * Add jsonschema_dingus * replaced `0.6dev2` by `0.6.dev2` --------- Co-authored-by: Will Moore <900055+will-moore@users.noreply.github.com> Co-authored-by: David Stansby <d.stansby@ucl.ac.uk> Co-authored-by: Davis Bennett <davis.v.bennett@gmail.com> Co-authored-by: Chris Barnes <chris.barnes@gerbi-gmb.de>
Well. This is my take on tying together the contents of the spec (specification text, examples, schemas) together in a single view. The contents on this branch are built on this page.
Major changes
Open issues
Looking forward to your feedback
Long Copilot description
This pull request introduces a comprehensive overhaul of the documentation build system and supporting files for the NGFF specification. The changes migrate the documentation to a Jupyter Book and MyST-based workflow, automate the generation of example and schema documentation, and update example metadata to the latest specification version. The PR also modernizes configuration, citation, and contribution guidance.
Documentation build system migration and automation:
.readthedocs.yamlconfiguration to enable building the documentation with Read the Docs using Python 3.13 and custom pre-build steps for Jupyter Book and schema/example generation (.readthedocs.yaml).docs/pre_build.py, a script that automatically generates Markdown documentation from JSON examples and schemas, including cross-references and summary tables (docs/pre_build.py).docs/requirements.txtto include all dependencies needed for the new Jupyter Book and schema documentation workflow (docs/requirements.txt).Jupyter Book configuration and structure:
_config.ymlfor Jupyter Book, specifying book metadata, repository links, HTML footer, MyST and Sphinx extensions, and output settings (_config.yml)._toc.ymlto organize the book structure, including chapters for examples, schemas, and contributor/citation/version pages (_toc.yml).Content updates and modernization:
citing.md), a contribution guide with formatting and referencing instructions (contribute.md), and a placeholder for JSON examples (docs/examples.md). [1] [2] [3]references.bib).Specification example updates:
examples/multiscales_strict/multiscales_example.jsonto use version "0.6dev2" and the new coordinate system structure, aligning with the latest NGFF specification.Cleanup and removal of legacy files:
header.include,copyright.include)as these are now handled by Jupyter Book configuration and templates. [1] [2]
These changes collectively modernize the documentation workflow, improve maintainability, and ensure that examples and schemas are always up-to-date and easy to navigate.