From 87741405720495c0bf3deefd1a4bcb6033143683 Mon Sep 17 00:00:00 2001 From: Tiago Lubiana Date: Thu, 11 Jun 2026 17:11:19 -0300 Subject: [PATCH 1/2] fix: remove wrong W3C branding, re-add OME They were lost in the migration from bs to Markdown. The old bikeshed documents were not rendering correctly --- boilerplate/copyright.include | 4 +++ boilerplate/header.include | 31 +++++++++++++++++ conf.py | 64 +++++++++++++++++++++++------------ 3 files changed, 78 insertions(+), 21 deletions(-) create mode 100644 boilerplate/copyright.include create mode 100644 boilerplate/header.include diff --git a/boilerplate/copyright.include b/boilerplate/copyright.include new file mode 100644 index 00000000..f0def708 --- /dev/null +++ b/boilerplate/copyright.include @@ -0,0 +1,4 @@ +Copyright © 2020-[YEAR] +OME® +(U. Dundee). +OME trademark rules apply. diff --git a/boilerplate/header.include b/boilerplate/header.include new file mode 100644 index 00000000..79b2fd56 --- /dev/null +++ b/boilerplate/header.include @@ -0,0 +1,31 @@ + + + + + + [TITLE] + + + +
+ + OME logo (6 circles in a hexagon) + +

[TITLE]

+

[LONGSTATUS], +

+
+
+ +
+
+ +
+ +

Status of this document

+
+
+ + +
diff --git a/conf.py b/conf.py index 29fcaf35..ede96b62 100644 --- a/conf.py +++ b/conf.py @@ -17,15 +17,12 @@ "myst_parser", "sphinx_reredirects", "sphinx_design", - "sphinxcontrib.bibtex"] + "sphinxcontrib.bibtex", +] bibtex_bibfiles = ["references.bib"] source_suffix = [".rst", ".md"] myst_heading_anchors = 5 -myst_enable_extensions = [ - "deflist", - "strikethrough", - "colon_fence" - ] +myst_enable_extensions = ["deflist", "strikethrough", "colon_fence"] templates_path = ["_templates"] exclude_patterns = [ @@ -57,7 +54,7 @@ "latest/index": "../specifications/0.5/index.html", "latest/": "../specifications/0.5/index.html", "dev/index": "../specifications/dev/index.html", - "dev/": "../specifications/dev/index.html" + "dev/": "../specifications/dev/index.html", } # -- Options for HTML output ------------------------------------------------- @@ -93,6 +90,7 @@ "_html_extra", ] + def build_served_html(): import glob import subprocess @@ -102,34 +100,58 @@ def build_served_html(): from pathlib import Path os.chdir(Path(__file__).parent) - versions = [d for d in os.listdir("specifications") if os.path.isdir(os.path.join("specifications", d))] + versions = [ + d + for d in os.listdir("specifications") + if os.path.isdir(os.path.join("specifications", d)) + ] for version in versions: # copy schemas to _html_extra - os.makedirs(f'_html_extra/{version}/schemas', exist_ok=True) - schemas = glob.glob(f'specifications/{version}/**/*.schema', recursive=True) + 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}') - + 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] + script = glob.glob(f"specifications/{version}/**/pre_build.py", recursive=True)[ + 0 + ] + + # Inject shared OME boilerplate next to index.bs so the legacy Bikeshed + # build renders OME branding instead of falling back to the W3C default. + # Kept here in the superproject so we never have to edit, commit, and + # bump every ngff-spec version submodule (the includes were lost exactly + # that way during the ngff -> ngff-spec migration). + spec_dir = os.path.dirname(script) + for inc in ("header.include", "copyright.include"): + src = os.path.join("boilerplate", inc) + if os.path.exists(src): + shutil.copy2(src, os.path.join(spec_dir, inc)) + print(f"✅ Injected {inc} for version {version}") + else: + print( + f"⚠️ Missing boilerplate/{inc}; {version} will use Bikeshed defaults" + ) subprocess.check_call([sys.executable, script]) - print('✅ Built rendered examples/schemas for version', version) + 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] - bikeshed_output = f'specifications/{version}/index.html' + myst_file = glob.glob(f"specifications/{version}/**/myst.yml", recursive=True)[ + 0 + ] + bikeshed_output = f"specifications/{version}/index.html" # copy built html files to _html_extra try: 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}') + shutil.copy2(bikeshed_output, f"_html_extra/{version}/index.html") + print(f"✅ Found legacy bikeshed, serving as extra html for {version}") except Exception as e: - print(f'⚠️ Could not copy served html for version {version}: {e}') + print(f"⚠️ Could not copy served html for version {version}: {e}") + build_served_html() - \ No newline at end of file From 15ab4dea2ce6395fff7bdf8a10df1881b8f7232e Mon Sep 17 00:00:00 2001 From: Tiago Lubiana Date: Thu, 11 Jun 2026 17:24:36 -0300 Subject: [PATCH 2/2] update bikeshed and Python versions --- readthedocs.yml | 4 ++-- requirements.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/readthedocs.yml b/readthedocs.yml index 4f2967e9..f643b380 100644 --- a/readthedocs.yml +++ b/readthedocs.yml @@ -3,7 +3,7 @@ version: 2 build: os: ubuntu-24.04 tools: - python: "3.10" + python: "3.13" nodejs: "22" submodules: @@ -21,4 +21,4 @@ python: install: - requirements: requirements.txt - method: pip - path: specifications/dev \ No newline at end of file + path: specifications/dev diff --git a/requirements.txt b/requirements.txt index 3479fbfd..19336c7f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -bikeshed<4.2 +bikeshed myst-parser pydata-sphinx-theme json-schema-for-humans