-
-
-"""
-
-
-def gen_version(version):
- version_path = Path(version)
- schema_path = version_path / "schemas"
- for schema_file in sorted(schema_path.glob("*.schema")):
- print(schema_file)
- generate_from_filename(
- schema_file,
- result_file_name=schema_path / schema_file.with_suffix(".html").name,
- config=GenerationConfiguration(template_name="js", with_footer=False),
- )
-
- schema_fnames = [
- p
- for p in sorted(schema_path.glob("*.html"))
- if p.name != "index.html"
- ]
- with open(schema_path / "index.html", "w") as f:
- f.write(
- get_version_index_html(version=version, schmea_fnames=schema_fnames)
- )
-
-
-def post_process():
+def build_served_html():
import glob
+ import subprocess
+ import sys
import os
import shutil
- import subprocess
-
- versions = ["latest"] + glob.glob("[0-9]*")
- for version in versions:
-
- # Run bikeshed
- index_file = f"{version}/index.bs"
- output_file = index_file.replace("bs", "html")
- output_dir = os.path.dirname(output_file)
- target_dir = os.path.join("_bikeshed", output_dir)
-
- run_bikeshed = True
-
- # Give the loop a chance to skip files if no build is needed/requested
- if "BIKESHED" not in os.environ and os.path.exists(output_file):
- src_time = os.path.getmtime(index_file)
- out_time = os.path.getmtime(output_file)
- if src_time < out_time:
- print(f"{index_file} unchanged")
- run_bikeshed = False
- if run_bikeshed:
- subprocess.check_call(
- f"bikeshed spec {index_file} {output_file}", shell=True,
- )
+ versions = [d for d in os.listdir("specifications") if os.path.isdir(os.path.join("specifications", d))]
- if os.path.exists(target_dir):
- shutil.rmtree(target_dir)
- shutil.copytree(output_dir, target_dir)
+ for version in versions:
- # Run json-schema-for-humans
+ # copy schemas to _html_extra
+ os.makedirs(f'_html_extra/{version}/schemas', exist_ok=True)
+ schemas = glob.glob(f'specifications/{version}/**/*.schema', recursive=True)
+ for schema in schemas:
+ shutil.copy2(schema, f'_html_extra/{version}/schemas/')
+ print(f'✅ Copied schemas for version {version}')
+
+ # find 'pre_build.py' in 'specifications' subdirectories
+ script = glob.glob(f'specifications/{version}/**/pre_build.py', recursive=True)[0]
+
+ subprocess.check_call([sys.executable, script])
+ print('✅ Built rendered examples/schemas for version', version)
+
+ # build jupyter-book docs in specification submodules
+ myst_file = glob.glob(f'specifications/{version}/**/myst.yml', recursive=True)[0]
+ if os.path.exists(myst_file):
+ cdir = os.getcwd()
+ try:
+ os.chdir(os.path.dirname(myst_file))
+ subprocess.check_call(['jupyter-book', 'build', '--ci', '--html'])
+ finally:
+ os.chdir(cdir)
+ print('✅ Built jupyter-book documentation for version', version)
+
+
+ # copy built html files to _html_extra
+ bikeshed_output = f'specifications/{version}/index.html'
try:
- d = os.getcwd()
- os.chdir("_bikeshed")
- gen_version(version)
- finally:
- os.chdir(d)
-
-
-post_process()
-del post_process
+ if os.path.exists(bikeshed_output):
+ shutil.copy2(bikeshed_output, f'_html_extra/{version}/index.html')
+ print(f'✅ Found legacy bikeshed, serving as extra html for {version}')
+ else:
+ build_dir = glob.glob(f'specifications/{version}/**/_build/html', recursive=True)[0]
+ shutil.copytree(build_dir, f'_html_extra/{version}', dirs_exist_ok=True)
+ print(f'✅ Copying jupyter-book documentation as extra html for {version}')
+ except Exception as e:
+ print(f'⚠️ Could not copy served html for version {version}: {e}')
+
+build_served_html()
+
\ No newline at end of file
diff --git a/latest b/latest
deleted file mode 160000
index 8cbba216..00000000
--- a/latest
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 8cbba216e37407bd2d4bd5c7128ab13bd0a6404e
diff --git a/.readthedocs.yaml b/readthedocs.yml
similarity index 74%
rename from .readthedocs.yaml
rename to readthedocs.yml
index b23558fa..fee71963 100644
--- a/.readthedocs.yaml
+++ b/readthedocs.yml
@@ -4,6 +4,7 @@ build:
os: ubuntu-24.04
tools:
python: "3.10"
+ nodejs: "22"
submodules:
include: all
@@ -15,3 +16,5 @@ sphinx:
python:
install:
- requirements: requirements.txt
+ - method: pip
+ path: specifications/0.6.dev2
\ No newline at end of file
diff --git a/references.bib b/references.bib
new file mode 100644
index 00000000..25e054af
--- /dev/null
+++ b/references.bib
@@ -0,0 +1,121 @@
+@article{moore2021ome,
+ title={OME-NGFF: a next-generation file format for expanding bioimaging data-access strategies},
+ author={Moore, Josh and Allan, Chris and Besson, S{\'e}bastien and Burel, Jean-Marie and Diel, Erin and Gault, David and Kozlowski, Kevin and Lindner, Dominik and Linkert, Melissa and Manz, Trevor and others},
+ journal={Nature methods},
+ volume={18},
+ number={12},
+ pages={1496--1498},
+ year={2021},
+ publisher={Nature Publishing Group US New York}
+}
+
+@software{ngff_spec_latest,
+ author = {Josh Moore},
+ title = {ome/ngff: Next-generation file format (NGFF)
+ specifications for storing bioimaging data in the
+ cloud.
+ },
+ month = nov,
+ year = 2020,
+ publisher = {Zenodo},
+ version = {0.0.1},
+ doi = {10.5281/zenodo.4282107},
+ url = {https://ngff.openmicroscopy.org/latest/},
+}
+
+@software{zarr,
+ author = {Alistair Miles and
+ jakirkham and
+ Martin Durant and
+ Matthias Bussonnier and
+ James Bourbeau and
+ Tarik Onalan and
+ Joe Hamman and
+ Zain Patel and
+ Matthew Rocklin and
+ shikharsg and
+ Ryan Abernathey and
+ Josh Moore and
+ Vincent Schut and
+ raphael dussin and
+ Elliott Sales de Andrade and
+ Charles Noyes and
+ Aleksandar Jelenak and
+ Anderson Banihirwe and
+ Chris Barnes and
+ George Sakkis and
+ Jan Funke and
+ Jerome Kelleher and
+ Joe Jevnik and
+ Justin Swaney and
+ Poruri Sai Rahul and
+ Stephan Saalfeld and
+ john and
+ Tommy Tran and
+ pyup.io bot and
+ sbalmer},
+ title = {zarr-developers/zarr-python: v2.5.0},
+ month = oct,
+ year = 2020,
+ publisher = {Zenodo},
+ version = {v2.5.0},
+ doi = {10.5281/zenodo.4069231},
+ url = {https://doi.org/10.5281/zenodo.4069231},
+}
+
+@software{n5,
+ author = {Stephan Saalfeld and
+ Igor Pisarev and
+ Philipp Hanslovsky and
+ Andrew Champion and
+ Curtis Rueden and
+ John Bogovic and
+ Mark Kittisopikul and
+ jakirkham},
+ title = {saalfeldlab/n5: n5-2.5.1},
+ month = may,
+ year = 2022,
+ publisher = {Zenodo},
+ version = {n5-2.5.1},
+ doi = {10.5281/zenodo.6578232},
+ url = {https://doi.org/10.5281/zenodo.6578232},
+}
+
+@software{ome-zarr-py,
+ author = {Josh Moore and
+ Will Moore and
+ Sébastien Besson and
+ jean-marie burel and
+ Constantin Pape and
+ Dimitri Papadopoulos Orfanos and
+ David Stansby and
+ toloudis and
+ Giovanni Palla and
+ Guillaume Gay and
+ Evan Lyall and
+ Satrajit Ghosh and
+ Simon Li and
+ Benjamin Rombaut and
+ Minh Nhat Nguyen and
+ Juan Nunez-Iglesias and
+ aeisenbarth and
+ Albert Dominguez Mantes and
+ Yaroslav Halchenko and
+ Joshua Gould and
+ Camilo Laiton and
+ Tommaso Comparin and
+ LucaMarconato and
+ Heath Patterson and
+ Wouter-Michiel Vierdag and
+ Talley Lambert and
+ Sean Martin and
+ Peter Sobolewski and
+ M Bussonnier},
+ title = {ome/ome-zarr-py: v0.12.2},
+ month = aug,
+ year = 2025,
+ publisher = {Zenodo},
+ version = {v0.12.2},
+ doi = {10.5281/zenodo.16925672},
+ url = {https://doi.org/10.5281/zenodo.16925672},
+}
\ No newline at end of file
diff --git a/requirements.txt b/requirements.txt
index 5409e6d9..3479fbfd 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -4,5 +4,5 @@ pydata-sphinx-theme
json-schema-for-humans
testresources
sphinx-reredirects
-sphinx-reredirects
-sphinx-design
\ No newline at end of file
+sphinxcontrib-bibtex
+sphinx-design
diff --git a/specifications/0.1 b/specifications/0.1
new file mode 160000
index 00000000..52db97ce
--- /dev/null
+++ b/specifications/0.1
@@ -0,0 +1 @@
+Subproject commit 52db97ceb723321e629825204e3f4da5e8fa80ae
diff --git a/specifications/0.2 b/specifications/0.2
new file mode 160000
index 00000000..22152cb2
--- /dev/null
+++ b/specifications/0.2
@@ -0,0 +1 @@
+Subproject commit 22152cb2e0891d7f1d5b5f8778252e263abdf4ab
diff --git a/specifications/0.5 b/specifications/0.5
new file mode 160000
index 00000000..41246310
--- /dev/null
+++ b/specifications/0.5
@@ -0,0 +1 @@
+Subproject commit 412463103412f0a5d31d325579793185eb9030c6
diff --git a/specifications/0.6.dev2 b/specifications/0.6.dev2
new file mode 160000
index 00000000..da4606bf
--- /dev/null
+++ b/specifications/0.6.dev2
@@ -0,0 +1 @@
+Subproject commit da4606bf96d2829ad74b4dbaf6de5afb6b7a595a
diff --git a/specifications/Dev b/specifications/Dev
new file mode 160000
index 00000000..05b8089c
--- /dev/null
+++ b/specifications/Dev
@@ -0,0 +1 @@
+Subproject commit 05b8089c73d67cd3daadfd6737f0ce17776504ae
diff --git a/specifications/index.md b/specifications/index.md
index abfe2e8d..c322bbfb 100644
--- a/specifications/index.md
+++ b/specifications/index.md
@@ -3,13 +3,18 @@ Specifications
OME-Zarr files have standardized metadata (that is the OME portion of "OME-Zarr") - each new version of OME-Zarr files has its own specification. Those specifications are listed below.
-The current released version of the OME-Zarr specification is 0.5.
-
-
+The current released version of the OME-Zarr specification is [0.5](0.5/ngff_spec/index.md).
+
+```{toctree}
+:maxdepth: 1
+:caption: available specifications
+
+Dev/index.md
+0.6.dev2/ngff_spec/specification.md
+0.5/index.md
+0.4/index.md
+0.3/index.md
+0.2/index.md
+0.1/index.md
+
+```
\ No newline at end of file