Skip to content

Commit b0525d7

Browse files
committed
Merge remote-tracking branch 'upstream/main' into include-all-authors
2 parents 53557f8 + 99b20ad commit b0525d7

295 files changed

Lines changed: 9839 additions & 4548 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
root = true
2+
3+
[*]
4+
end_of_line = lf
5+
insert_final_newline = true
6+
charset = utf-8
7+
trim_trailing_whitespace = true
8+
9+
[*.{py,md,ini}]
10+
indent_style = space
11+
indent_size = 4
12+
13+
[*.{json,yaml,yml,cff}]
14+
indent_style = space
15+
indent_size = 2

.github/workflows/codespell.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Codespell configuration is within .codespellrc
2+
---
3+
name: Codespell
4+
5+
on:
6+
push:
7+
branches: [main]
8+
pull_request:
9+
branches: [main]
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
codespell:
16+
name: Check for spelling errors
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
- name: Codespell
23+
uses: codespell-project/actions-codespell@v2

.github/workflows/review.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
name: Add review url
3+
4+
on:
5+
pull_request_target:
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: peter-evans/find-comment@v2
12+
id: fc
13+
with:
14+
issue-number: ${{ github.event.pull_request.number }}
15+
comment-author: 'github-actions[bot]'
16+
body-includes: Automated Review URLs
17+
18+
- uses: peter-evans/create-or-update-comment@v2
19+
with:
20+
comment-id: ${{ steps.fc.outputs.comment-id }}
21+
issue-number: ${{ github.event.pull_request.number }}
22+
body: |
23+
#### Automated Review URLs
24+
* [Readthedocs](https://ngff-spec--${{ github.event.pull_request.number }}.org.readthedocs.build/)
25+
edit-mode: replace

.github/workflows/validation.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Validation
2+
on:
3+
push:
4+
pull_request:
5+
6+
jobs:
7+
validate:
8+
name: Validation
9+
runs-on: ubuntu-24.04
10+
steps:
11+
- uses: actions/checkout@v4
12+
- uses: actions/setup-python@v5
13+
with:
14+
python-version: '3.12'
15+
- run: python -mpip install --upgrade wheel tox
16+
- run: tox

.gitignore

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,14 @@ _bikeshed
88
.*plist
99

1010
# do not sync auto-generated md files
11-
ngff_spec/_generated
11+
footer.md
12+
examples.md
13+
schemas.md
14+
examples/**/*.md
15+
schemas/**/*.md
16+
schemas/**/*.html
17+
schemas/**/*.css
18+
schemas/**/*.js
1219

1320
# Byte-compiled / optimized / DLL files
1421
__pycache__/
@@ -35,7 +42,6 @@ var/
3542
*.egg-info/
3643
.installed.cfg
3744
*.egg
38-
*_version.py
3945

4046
# PyInstaller
4147
# Usually these files are written by a python script from a template
@@ -88,9 +94,6 @@ target/
8894
# OS
8995
.DS_Store
9096

91-
# written by setuptools_scm
92-
*/_version.py
93-
9497
# PyBuilder
9598
.idea
9699
venv/

.readthedocs.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ build:
1111

1212
pre_build:
1313
# Run the script that autogenerates content before building the docs
14-
- "uv run python ngff_spec/pre_build.py"
14+
- "uv run python pre_build.py"
1515

1616
build:
1717
html:
18-
- cd ngff_spec/ && jupyter book build --html --ci
18+
- jupyter book build --html --ci
1919
- mkdir -p $READTHEDOCS_OUTPUT
20-
- mv ./ngff_spec/_build/html $READTHEDOCS_OUTPUT
20+
- mv ./_build/html $READTHEDOCS_OUTPUT

CITATION.cff

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
cff-version: 1.2.0
2+
message: Please cite the following works when using this project.
3+
abstract: >-
4+
A growing community is constructing a next-generation file format (NGFF) for
5+
bioimaging to overcome problems of scalability and heterogeneity. Organized by
6+
the Open Microscopy Environment (OME), individuals and institutes across
7+
diverse modalities facing these problems have designed a format specification
8+
process (OME-NGFF) to address these needs. Those community members have built
9+
the format itself – OME-Zarr – along with tools and data resources available
10+
today to increase FAIR access and remove barriers in the scientific process.
11+
The current momentum offers an opportunity to unify a key component of the
12+
bioimaging domain — the file format that underlies so many personal,
13+
institutional, and global data management and analysis tasks.
14+
title: Next-generation file format specification
15+
authors:
16+
- family-names: NGFF-community
17+
given-names: ''
18+
identifiers:
19+
- type: doi
20+
value: 10.1038/s41592-021-01326-w
21+
description: Original Nature Methods article (2021)
22+
- type: doi
23+
value: 10.1101/2023.02.17.528834v2
24+
description: OME-Zarr preprint (2023)
25+
keywords:
26+
- FAIR
27+
- community
28+
- bioimaging
29+
- data
30+
- cloud
31+
- format
32+
license: CC-BY-4.0
33+
url: https://ngff.openmicroscopy.org
34+
repository: https://github.com/ome/ngff-spec
35+
preferred-citation:
36+
type: article
37+
doi: 10.1038/s41592-021-01326-w
38+
journal: Nature Methods
39+
month: 11
40+
start: 1496
41+
end: 1498
42+
title: >-
43+
OME-NGFF: a next-generation file format for expanding bioimaging data-access
44+
strategies
45+
issue: 12
46+
volume: 18
47+
year: 2021
48+
authors:
49+
- given-names: Josh
50+
family-names: Moore
51+
orcid: https://orcid.org/0000-0003-4028-811X
52+
- given-names: Chris
53+
family-names: Allan
54+
- given-names: Sébastien
55+
family-names: Besson
56+
orcid: https://orcid.org/0000-0001-8783-1429
57+
- given-names: Jean-Marie
58+
family-names: Burel
59+
orcid: https://orcid.org/0000-0002-1789-1861
60+
- given-names: Erin
61+
family-names: Diel
62+
orcid: https://orcid.org/0000-0003-2526-3512
63+
- given-names: David
64+
family-names: Gault
65+
- given-names: Kevin
66+
family-names: Kozlowski
67+
- given-names: Dominik
68+
family-names: Lindner
69+
orcid: https://orcid.org/0000-0001-8038-1250
70+
- given-names: Melissa
71+
family-names: Linkert
72+
- given-names: Trevor
73+
family-names: Manz
74+
orcid: https://orcid.org/0000-0001-7694-5164
75+
- given-names: Will
76+
family-names: Moore
77+
orcid: https://orcid.org/0000-0002-7264-8338
78+
- given-names: Constantin
79+
family-names: Pape
80+
orcid: https://orcid.org/0000-0001-6562-7187
81+
- given-names: Christian
82+
family-names: Tischer
83+
orcid: https://orcid.org/0000-0003-4105-1990
84+
- given-names: Jason R.
85+
family-names: Swedlow
86+
orcid: https://orcid.org/0000-0002-2198-1958
87+
type: software
88+
repository-code: https://github.com/ome/ngff

README.md

Lines changed: 76 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,80 @@
33
NGFF is an initiative by the bioimaging community to develop imaging format specifications to
44
address issues of scalability and interoperability.
55

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.
6+
This repository contains the central [specification text](./specification.md),
7+
a comprehensive list of [metadata examples](./examples)
8+
as well as [json schemas](./schemas) to validate written ome-zarr image data.
99

10-
The built including contribution hints can be found **[here]([url](https://ngff-spec.readthedocs.io/en/latest/specification.html))**.
10+
The built documentation including contribution hints can be found **[here](https://ngff-spec.readthedocs.io/en/latest/)**.
11+
12+
## Conformance tests
13+
14+
Conformance can be tested at several levels.
15+
16+
1. Validating that individual fields of a zarr attributes object are valid.
17+
2. Validating a single zarr attributes object (i.e. containing OME-Zarr metadata)
18+
19+
- Validates that correct data can be represented, and that internally inconsistent data can be caught
20+
- Cannot validate references to other objects in the zarr hierarchy
21+
- Cannot validate conformance to other zarr metadata e.g. array data type, dimensionality
22+
23+
3. Validating a metadata-only zarr hierarchy
24+
25+
- Can validate references to other objects and other zarr metadata
26+
- Cannot validate values e.g. the invertibility of an affine matrix defined as a zarr array
27+
28+
4. Validating a zarr hierarchy with data
29+
30+
This repository contains
31+
32+
- JSON schemas which handle level 1
33+
- a set of test zarr attributes JSON for level 2 ([`./tests/attributes`](./tests/attributes/))
34+
- a set of metadata-only zarr hierarchies for level 3 ([`./tests/zarr`](./tests/zarr/))
35+
36+
as well as a tool for feeding these test cases into an external validator.
37+
38+
### Testing tool
39+
40+
See [`ome_zarr_conformance.py`](./conformance/ome_zarr_conformance.py).
41+
42+
Run it in either `attributes` or `zarr` mode, optionally with filters for test names or types.
43+
44+
Wrap your own OME-Zarr implementation in a
45+
["dingus"](https://talk.commonmark.org/t/origin-of-the-usage-for-dingus/1226) CLI,
46+
which takes as its last argument the path to either
47+
48+
- attributes mode: a JSON file representing zarr attributes (i.e. containing OME-Zarr metadata)
49+
- zarr mode: a zarr hierarchy root on the file system (i.e. a directory containing `zarr.json`)
50+
51+
The dingus should print to STDOUT a JSON object with the keys:
52+
53+
- `"valid"`: boolean, whether this is valid
54+
- optionally `"message"`: string, free text describing the success/ failure
55+
56+
Call the tool like
57+
58+
```sh
59+
python3 ./conformance/ome_zarr_conformance.py attributes -- path/to/my/dingus -dingusArg +argValue 10
60+
```
61+
62+
Each call to the dingus will then look like
63+
64+
```sh
65+
>>> path/to/my/dingus -dingusArg +argValue 10 /home/you/ngff-spec/tests/attributes/spec/valid/custom_type_axes.json
66+
67+
{"valid": true}
68+
```
69+
70+
`ome_zarr_conformance.py` will parse the JSON output and format the results of all requested tests in a tab-separated table.
71+
72+
Full usage information is available with `./conformance/ome_zarr_conformance.py --help`.
73+
74+
### JSON Schema tests
75+
76+
You can use the conformance testing tool to test JSON Schema-based validation with
77+
78+
```sh
79+
>>> ./conformance/ome_zarr_conformance.py attributes -- uv run ./conformance/jsonschema_dingus.py attributes
80+
```
81+
82+
Some failures are expected as JSON Schema can only handle level 1 validation.

_version.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__version__ = '0.6.dev3'
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
Citing
2-
======
1+
---
2+
title: Citing
3+
author: ""
4+
---
35
(citing)=
46

57
[Next-generation file format (NGFF) specifications for storing bioimaging data in the cloud.](https://ngff.openmicroscopy.org/0.4)
68
J. Moore, *et al*. Open Microscopy Environment Consortium, 8 February 2022.
79

810
This edition of the specification is [https://ngff.openmicroscopy.org/{{version}}](https://ngff.openmicroscopy.org/{{version}}]).
9-
The latest edition is publically available {cite}`ngff_spec_latest`.
11+
The latest edition is publicly available {cite}`ngff_spec_latest`.
1012

1113
```{bibliography}
1214
:style: unsrt

0 commit comments

Comments
 (0)