Skip to content

Commit 6fdeee8

Browse files
authored
Minor doc cleanups/improvements (#288)
* Remove nav tabs * Fix tutorial comments * Add zarr interlinks * Clean CLI docs * Add CLi validation to how do page * Fix attribute access docs * Clean up wellgroupnotfounderror docs * Add docs for plate end/start times
1 parent 420f195 commit 6fdeee8

File tree

10 files changed

+29
-15
lines changed

10 files changed

+29
-15
lines changed

docs/api/common/well.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Well
2+
3+
::: ome_zarr_models.common.well

docs/api/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This package contains a number of classes representing _OME-Zarr groups_.
44
Each of these classes represent a single OME-Zarr group.
55

66
Each group has a set of associated _metadata attributes_, which provide a listing of the OME-Zarr attributes available for each group.
7-
To access these, use the `.attributes` property on the group objects.
7+
To access these, use the `.ome_attributes` property on the group objects.
88

99
A listing of the group objects and associated metadata objects is given below for each version of the OME-Zarr specification.
1010

docs/cli.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Command line interface
22

3-
`ome-zarr-models` has a command line interface.
3+
`ome-zarr-models` can validate and show metadata using a command line interface.
4+
45
To see available commands,
56

67
```sh
@@ -34,13 +35,13 @@ ome-zarr-models validate https://uk1s3.embassy.ebi.ac.uk/idr/zarr/v0.5/idr0066/E
3435
✅ Valid OME-Zarr
3536
```
3637

37-
The group can be specified as any string that can be parsed by **link to zarr.open_group**.
38+
The group can be specified as any string that can be parsed by [zarr.open_group][].
3839

3940
## Info
4041

4142
To get information about an OME-Zarr group, pass the path to a group to `ome-zarr-models info`.
4243
This will print the metadata (see below for an example).
43-
If you have the `rich` Python package installed, a more readable output will be produced.
44+
If you have the [`rich`](https://rich.readthedocs.io) Python package installed, a more readable output will be produced.
4445

4546
```sh
4647
ome-zarr-models info https://uk1s3.embassy.ebi.ac.uk/idr/zarr/v0.5/idr0066/ExpD_chicken_embryo_MIP.ome.zarr

docs/how-to.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
## Validate an OME-Zarr group
44

5+
### Command line
6+
7+
Use `ome-zarr-models validate <path to group>`.
8+
9+
### Python
10+
511
If you know what type of group it is, use the `from_zarr()` method on [one of the group objects](api/index.md):
612

713
```python

docs/tutorial.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
# # Tutorial
2-
#
3-
# This tutorial provides a full worked example of using `ome-zarr-models`
1+
# This tutorial provides a full worked example of using `ome-zarr-models` in Python
2+
43
import os
54
import tempfile
65

@@ -24,6 +23,7 @@
2423
"https://uk1s3.embassy.ebi.ac.uk/idr/zarr/v0.5/idr0066/ExpD_chicken_embryo_MIP.ome.zarr",
2524
mode="r",
2625
)
26+
2727
# If you're not sure what type or OME-Zarr version of data you have, you can
2828
# use `open_ome_zarr()` to automatically 'guess' the correct group:
2929

@@ -75,7 +75,6 @@
7575
# First, we need to create `ArraySpec` objects, which tell `ome-zarr-models`
7676
# what the structure of the data arrays will be.
7777

78-
7978
array_specs: list[AnyArraySpec] = [
8079
ArraySpec(
8180
shape=(100, 100),

mkdocs.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ theme:
88
icon:
99
repo: fontawesome/brands/github
1010
features:
11-
- navigation.tabs
1211
- navigation.indexes
1312
palette:
1413
# Palette toggle for light mode
@@ -48,10 +47,11 @@ plugins:
4847
handlers:
4948
python:
5049
paths: [src]
51-
import:
50+
inventories:
5251
- https://docs.python.org/3/objects.inv
5352
- https://pydantic-zarr.readthedocs.io/stable/objects.inv
5453
- https://docs.pydantic.dev/latest/objects.inv
54+
- https://zarr.readthedocs.io/en/stable/objects.inv
5555

5656
options:
5757
docstring_style: numpy
@@ -104,6 +104,7 @@ nav:
104104
- Shared:
105105
- Base objects: api/common/base.md
106106
- Validation: api/common/validation.md
107+
- Well: api/common/well.md
107108
- Changelog: changelog.md
108109
- Contributing: contributing.md
109110

src/ome_zarr_models/_v06/hcs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def get_well_group(self, i: int) -> Well:
118118
119119
Raises
120120
------
121-
WellGroupNotFoundError :
121+
WellGroupNotFoundError
122122
If no Zarr group is found at the well path.
123123
"""
124124
if self.members is None:

src/ome_zarr_models/common/plate.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,12 @@ class Acquisition(BaseAttrs):
3838
description="Maximum number of fields of view for the acquisition",
3939
)
4040
description: str | None = None
41-
starttime: int | None = None
42-
endtime: int | None = None
41+
starttime: int | None = Field(
42+
default=None, description="Integer epoch timestamp of acquisition start time"
43+
)
44+
endtime: int | None = Field(
45+
default=None, description="Integer epoch timestamp of acquisition end time"
46+
)
4347

4448

4549
class WellInPlate(BaseAttrs):

src/ome_zarr_models/v04/hcs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def get_well_group(self, i: int) -> Well:
113113
114114
Raises
115115
------
116-
WellGroupNotFoundError :
116+
WellGroupNotFoundError
117117
If no Zarr group is found at the well path.
118118
"""
119119
if self.members is None:

src/ome_zarr_models/v05/hcs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def get_well_group(self, i: int) -> Well:
119119
120120
Raises
121121
------
122-
WellGroupNotFoundError :
122+
WellGroupNotFoundError
123123
If no Zarr group is found at the well path.
124124
"""
125125
if self.members is None:

0 commit comments

Comments
 (0)