Skip to content

Subproject ngff-spec under specfications directory#404

Merged
joshmoore merged 53 commits intoome:mainfrom
jo-mueller:subproject-ngff-spec
Feb 16, 2026
Merged

Subproject ngff-spec under specfications directory#404
joshmoore merged 53 commits intoome:mainfrom
jo-mueller:subproject-ngff-spec

Conversation

@jo-mueller
Copy link
Contributor

@jo-mueller jo-mueller commented Jan 7, 2026

Fixes #399

This is a proposed solution on how a joint layout of the ngff page and the future home of the spec, ome/ngff-spec could look like.

Key changes:

  • Deprecated bikeshed: The specs of .5 and 0.6.devX were converted into markdown/jupyter-book and are added as submodules under the specifications folder here in ngff
  • Moved submodules: As mentioned before, I removed the current submodule structure with the versions on the repo root and the spec versions living on different branches of this repo. Instead, the submodules point to different branches of the ngff-spec repo
  • Consistent build: Since the spec is now written in markdown, the respective md-pages can simply be added to a sphinx toctree directive over here on the ngff page - and as such be part of a uniform page layout. The URLs from which the spec documents were previously served (i.e. https://ngff.openmicroscopy.org/0.5/index.html now redirect to the respective location in the submodule:
    /0.5/index.html --> /specifications/0.5/index.html
    /0.5 --> /specifications/0.5
  • Schemas still served at same location: As right now, you can still access and download schemas from, say, https://ngff.openmicroscopy.org/0.5/schemas/image.schema

TODO

  • Include changelog, version history into specifications section?
  • Add the examples/schemas subsections for the older versions, too?
  • Fix providing html-rendered documents from json-schema-for-humans

- update build tools to handle ngff-spec contents
- Make sure schemas are provided as html artefacts
- deprecate bikeshed
@github-actions
Copy link
Contributor

github-actions bot commented Jan 7, 2026

Automated Review URLs

@lubianat
Copy link
Contributor

lubianat commented Jan 7, 2026

should we move with

preview on your link looks good, though

@jo-mueller
Copy link
Contributor Author

@lubianat #408 makes total sense to go in first. On second and third thought, I think I may also undo the RTD deprecation in here. My original reason for doing this in the first place was the lack of customization options on how to integrate ngff-spec pages in the ngff page.

But since the placing of the spec submodules under the /specifications directory and the direct inclusion into the ngff page's toctree kind of solve that, maybe that's not an urgent need.

@lubianat
Copy link
Contributor

I know this is WIP, but I don't really see 0.1, 0.2 etc there. Am I doing something wrong?

image

@jo-mueller
Copy link
Contributor Author

@lubianat not at all :) We only merged the backport for 0.1...0.4 last week and I haven't updated the submodule configuration here yet. Will do asap!

@jo-mueller
Copy link
Contributor Author

jo-mueller commented Feb 4, 2026

@lubianat thanks for the review

  • Adding latest as its own submodule is going to be tricky here because the entry in the table of contents is generated by the headings in the actual doc. So even adding 0.5 as a latest submodule doesn't make a difference because it carries the same header (i.e., 0.5) as the 0.5 submodule. I added a redirect to the confic though so that https://ngff--404.org.readthedocs.build/specifications/latest resolves correctly to https://ngff--404.org.readthedocs.build/specifications/0.5
  • header info rendering weirdly (now it does not render at all): I added the metadata that was just dumped into the document into the document's frontmatter section:
    ---
    metadata is here now
    ---
    
    apparently sphinx is able to parse the abstract field from that section, but not the rest 🙄. I can also remove the frontmatter section entirely from there 🤷‍♂️
  • copyright OME statement: What do you mean with that, exactly?
  • Dev uppercase: Needs to be fixed over at ngff-spec

@lubianat
Copy link
Contributor

lubianat commented Feb 4, 2026

on the copyright statement:

on the current website, bikeshed docs have this:

grafik

maybe I am overthinking it, but it seems important

@jo-mueller
Copy link
Contributor Author

I see! On the ngff-spec repo, the footer exists on the built pages:

image

Where do you think would be the correct place to put it? Would it collide with the copyright statement that's already on the page?

image

@lubianat
Copy link
Contributor

lubianat commented Feb 4, 2026

Oh, I had not seen that. I think this may be more "political" than I can decide on, but perhaps the NGFF credit is enough?

Maybe that is a @joshmoore question, maybe for the PR review...

Copy link
Contributor

@lubianat lubianat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is in a safe shape to merge. Not perfect, perhaps, but good enough.

@jo-mueller
Copy link
Contributor Author

I think this is ready to pull the trigger so we can go forward with other things :)

@imagesc-bot
Copy link

This pull request has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/ngff-weekly-dev-update-thread/110810/56

@jo-mueller jo-mueller changed the title WIP: Subproject ngff-spec under specfications directory Subproject ngff-spec under specfications directory Feb 10, 2026
@joshmoore
Copy link
Member

Super excited to see this go in. 🎉 Thanks to @jo-mueller for driving the refactoring and to everyone for the review. There will likely be a series of smaller changes from here on out. Please feel free to open issues if you see anything that needs fixing.

@joshmoore joshmoore merged commit b56fd00 into ome:main Feb 16, 2026
3 checks passed
@lubianat lubianat requested a review from Copilot February 16, 2026 15:54
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR reorganizes the NGFF specifications by moving them from root-level submodules to a dedicated specifications directory, while transitioning from Bikeshed to Markdown/Jupyter-Book format. The changes enable unified documentation hosting at ngff.openmicroscopy.org with proper redirects from legacy URLs.

Changes:

  • Relocated version submodules (0.1-0.5, dev, latest) from repository root to specifications/ directory, pointing to the new ome/ngff-spec repository
  • Replaced Bikeshed-based build process with Jupyter-Book/MyST workflow for specification rendering
  • Added bibliography support and redirects to maintain backward compatibility with existing specification URLs

Reviewed changes

Copilot reviewed 21 out of 23 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
specifications/index.md Updated version links to use Markdown references and toctree structure instead of HTML
specifications/{dev,0.5,0.4,0.3,0.2,0.1} New submodule references pointing to ome/ngff-spec branches
requirements.txt Added sphinxcontrib-bibtex dependency, removed duplicate sphinx-reredirects
references.bib Added bibliography entries for NGFF, Zarr, N5, and ome-zarr-py
latest, 0.5, 0.4, 0.3, 0.2, 0.1 Removed old root-level submodules
conf.py Replaced Bikeshed processing with build_served_html() function for specifications
.readthedocs.yaml Added Node.js 22 toolchain and pip installation for specifications/dev
.gitmodules Updated all submodule paths to specifications/ directory with ome/ngff-spec URLs
.gitignore Renamed _bikeshed directory to _html_extra
.github/workflows/validation.yml Commented out validation workflow
.github/workflows/review.yml Commented out review URL workflow
.github/workflows/dependabot.yml Added Dependabot configuration for specifications/dev submodule
.codespellrc Excluded references.bib from spell checking

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

<li> <a href="../0.2/index.html">0.2</a> March 2021</li>
<li> <a href="../0.1/index.html">0.1</a> November 2020</li>
</ul>
The current released version of the OME-Zarr specification is [0.5](0.5/ngff_spec/index.md).
Copy link

Copilot AI Feb 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The link path appears incorrect. Line 6 references 0.5/ngff_spec/index.md but line 13 in the toctree references 0.5/index.md. These paths should be consistent, and based on the toctree structure, line 6 should likely point to 0.5/index.md instead.

Suggested change
The current released version of the OME-Zarr specification is [0.5](0.5/ngff_spec/index.md).
The current released version of the OME-Zarr specification is [0.5](0.5/index.md).

Copilot uses AI. Check for mistakes.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jo-mueller - I think copilot spotted a true bug here. The link there is leading to nothing indeed:

see https://ngff.openmicroscopy.org/specifications/index.html#0.5/ngff_spec/index.md

maybe we can add this to #440?

subprocess.check_call(
f"bikeshed spec {index_file} {output_file}", shell=True,
)
subprocess.check_call([sys.executable, script])
Copy link

Copilot AI Feb 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The subprocess call lacks error handling or informative error messages. If the pre_build.py script fails, users won't know which version or script caused the failure. Consider wrapping in a try-except block with a descriptive error message indicating the version and script path.

Suggested change
subprocess.check_call([sys.executable, script])
try:
subprocess.check_call([sys.executable, script])
except subprocess.CalledProcessError as e:
print(f'❌ Failed to run pre_build script for version {version} at {script}: return code {e.returncode}')
raise
except Exception as e:
print(f'❌ Unexpected error while running pre_build script for version {version} at {script}: {e}')
raise

Copilot uses AI. Check for mistakes.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the kind of thing I see as extra copilot noise. A decision with trade-offs that it is making. Could be better in theory, but in real life adds burdens around

shutil.rmtree(target_dir)
shutil.copytree(output_dir, target_dir)
# build jupyter-book docs in specification submodules
myst_file = glob.glob(f'specifications/{version}/**/myst.yml', recursive=True)[0]
Copy link

Copilot AI Feb 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lines 123-124 define variables that are never used in the function. The myst_file variable is assigned but not referenced anywhere, and bikeshed_output is only used in the try-except block below. If myst_file serves no purpose, it should be removed to avoid confusion.

Suggested change
myst_file = glob.glob(f'specifications/{version}/**/myst.yml', recursive=True)[0]

Copilot uses AI. Check for mistakes.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok clean up. not necessary, not harmful.

clean codewise — only the slightly painful cognitive burden of reviewing a bot suggestion (which is not nothing)

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.

ngff repo structural changes

6 participants