Skip to content

Commit 5fdf667

Browse files
jo-muellerCopilot
andauthored
Upgrade to jupyter book 2 (#20)
* 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 * Fix cross-reference Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fix empty cross-reference Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Typo * Update README.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 8bb0957 commit 5fdf667

File tree

13 files changed

+249
-208
lines changed

13 files changed

+249
-208
lines changed

.readthedocs.yaml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
version: 2
2-
32
build:
43
os: ubuntu-22.04
54
tools:
6-
python: "3.13"
5+
python: "3.12"
6+
nodejs: "22"
77
jobs:
8+
post_install:
9+
- pip install uv
10+
- UV_PROJECT_ENVIRONMENT=$READTHEDOCS_VIRTUALENV_PATH uv sync --link-mode=copy
11+
812
pre_build:
9-
# Generate the Sphinx configuration for this Jupyter Book so it builds.
10-
- "jupyter-book config sphinx ."
11-
- "python ./docs/pre_build.py"
12-
13-
python:
14-
install:
15-
- requirements: docs/requirements.txt
16-
13+
# Run the script that autogenerates content before building the docs
14+
- "uv run python ngff_spec/pre_build.py"
1715

18-
sphinx:
19-
configuration: conf.py
16+
build:
17+
html:
18+
- cd ngff_spec/ && jupyter book build --html --ci
19+
- mkdir -p $READTHEDOCS_OUTPUT
20+
- mv ./ngff_spec/_build/html $READTHEDOCS_OUTPUT

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# OME-NGFF file format specification
2+
3+
NGFF is an initiative by the bioimaging community to develop imaging format specifications to
4+
address issues of scalability and interoperability.
5+
6+
This repository contains the central [specification text](./ngff_spec/specification.md),
7+
a comprehensive list of [metadata examples](./ngff_spec/examples)
8+
as well as [json schemas](./ngff_spec/schemas) to validate written ome-zarr image data.
9+
10+
The built documentation including contribution hints can be found **[here](https://ngff-spec.readthedocs.io/en/latest/specification.html)**.

_config.yml

Lines changed: 0 additions & 83 deletions
This file was deleted.

_toc.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

ngff_spec/contribute.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Build and inspect changes to the documentation before submitting a PR.
1313
To do so, you first need to install the necessary dependencies:
1414

1515
```bash
16-
pip install -r requirements.txt
16+
pip install .
1717
```
1818

1919
This document uses [jupyter-book](https://jupyterbook.org) to generate the pages
@@ -22,8 +22,8 @@ After installing these via the dependencies,
2222
navigate into the repository on your machine and build the book using the following command:
2323

2424
```bash
25-
python pre_build.py
26-
jupyter-book build .
25+
python ngff_spec/pre_build.py
26+
jupyter book build ngff_spec
2727
```
2828

2929
You'll find the built webpages under `_build/html`.
@@ -48,7 +48,7 @@ It is recommended to use the following syntax in this document for consistency:
4848

4949
```
5050
anchor: (your-reference-name)=
51-
reference: [This is a reference](your-reference-name)
51+
reference: [This is a reference](#your-reference-name)
5252
```
5353

5454
#### Admonitions
@@ -85,6 +85,8 @@ use this syntax:
8585
Some informative text about your example
8686
```{literalinclude} path/to/example.json
8787
:language: json
88+
:linenos:
89+
:tab-width: 2
8890
```
8991
````
9092
`````

ngff_spec/examples.md

Lines changed: 58 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,59 @@
1-
# JSON Examples
1+
---
2+
title: NGFF metadata JSON Examples
3+
short_title: JSON Examples
4+
---
25

3-
This document contains JSON examples for ngff-compliant metadata layouts.
6+
This section contains JSON examples for various metadata layouts.
7+
8+
## bf2raw
9+
- [image](#examples:bf2raw:image)
10+
- [plate](#examples:bf2raw:plate)
11+
12+
## coordSystems
13+
- [arrayCoordSys](#examples:coordSystems:arrayCoordSys)
14+
15+
## label_strict
16+
- [colors_properties](#examples:label_strict:colors_properties)
17+
18+
## multiscales_strict
19+
- [multiscales_example](#examples:multiscales_strict:multiscales_example)
20+
- [multiscales_example_relative](#examples:multiscales_strict:multiscales_example_relative)
21+
- [multiscales_transformations](#examples:multiscales_strict:multiscales_transformations)
22+
23+
## ome
24+
- [series-2](#examples:ome:series-2)
25+
26+
## plate_strict
27+
- [plate_2wells](#examples:plate_strict:plate_2wells)
28+
- [plate_6wells](#examples:plate_strict:plate_6wells)
29+
30+
## subspace
31+
- [subspaceMultidim](#examples:subspace:subspaceMultidim)
32+
- [subspacePermute](#examples:subspace:subspacePermute)
33+
34+
## transformations
35+
- [affine2d2d](#examples:transformations:affine2d2d)
36+
- [affine2d3d](#examples:transformations:affine2d3d)
37+
- [bijection](#examples:transformations:bijection)
38+
- [bijection_verbose](#examples:transformations:bijection_verbose)
39+
- [byDimension1](#examples:transformations:byDimension1)
40+
- [byDimension2](#examples:transformations:byDimension2)
41+
- [byDimensionInvalid1](#examples:transformations:byDimensionInvalid1)
42+
- [byDimensionInvalid2](#examples:transformations:byDimensionInvalid2)
43+
- [byDimensionXarray](#examples:transformations:byDimensionXarray)
44+
- [coordinates1d](#examples:transformations:coordinates1d)
45+
- [displacement1d](#examples:transformations:displacement1d)
46+
- [identity](#examples:transformations:identity)
47+
- [inverseOf](#examples:transformations:inverseOf)
48+
- [mapAxis1](#examples:transformations:mapAxis1)
49+
- [mapAxis2](#examples:transformations:mapAxis2)
50+
- [rotation](#examples:transformations:rotation)
51+
- [scale](#examples:transformations:scale)
52+
- [sequence](#examples:transformations:sequence)
53+
- [sequenceSubspace1](#examples:transformations:sequenceSubspace1)
54+
- [translation](#examples:transformations:translation)
55+
- [xarrayLike](#examples:transformations:xarrayLike)
56+
57+
## well_strict
58+
- [well_2fields](#examples:well_strict:well_2fields)
59+
- [well_4fields](#examples:well_strict:well_4fields)

ngff_spec/myst.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
version: 1
2+
project:
3+
title: Next-generation file format specification
4+
authors:
5+
- name: NGFF-community
6+
github: ome/ngff-spec
7+
bibliography:
8+
- references.bib
9+
exports:
10+
- format: pdf
11+
template: plain_latex_book
12+
output: exports/book.pdf
13+
toc:
14+
- file: specification.md
15+
- file: examples.md
16+
children:
17+
- pattern: _generated/examples/*
18+
- file: schemas.md
19+
children:
20+
- pattern: _generated/schemas/markdown/*
21+
- file: contribute.md
22+
- file: citing.md
23+
- file: version_history.md
24+
site:
25+
options:
26+
logo: https://www.openmicroscopy.org/img/logos/ome-logomark.svg
27+
folders: true
28+
hide_myst_branding: true
29+
parts:
30+
footer: footer.md
31+
32+
# Temporarily hash-pin the theme.
33+
# See: https://github.com/jupytercon/jupytercon2025-developingextensions/issues/6
34+
template: "https://github.com/myst-templates/book-theme/archive/de4c1e9c09c6cd12fc529c1f22e8abf8e7f35381.zip"

0 commit comments

Comments
 (0)