Skip to content

Commit

Permalink
UAPI docs update (#223)
Browse files Browse the repository at this point in the history
* format

* update README

* update type hint and docstring

* add version switcher item

* format json

* improve text on the documentation badge
  • Loading branch information
ziw-liu authored Jul 1, 2024
1 parent f07e317 commit 80b6839
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 10 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and deploy docs
name: documentation

on:
push:
Expand All @@ -22,7 +22,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
with:
with:
fetch-depth: 0
- name: Setup Pages
id: pages
Expand All @@ -45,7 +45,7 @@ jobs:
- name: Upload build artifacts
uses: actions/upload-pages-artifact@v1
with:
path: './docs/build/html'
path: "./docs/build/html"

deploy:
environment:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ used at the Biohub and in the broader imaging community.

### Installation

Install a pre-release of iohub with pip:
Install a released version of iohub from PyPI with pip:

```sh
pip install iohub
Expand Down Expand Up @@ -103,7 +103,7 @@ Read a directory containing a TIFF dataset:
from iohub import read_images

reader = read_images("/path/to/data/")
print(reader.shape)
print(reader)
```

## Why iohub?
Expand Down
6 changes: 5 additions & 1 deletion docs/source/_static/switcher.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,9 @@
{
"version": "latest",
"url": "/main/index.html"
},
{
"version": "v0.1.0",
"url": "/v0.1.0/index.html"
}
]
]
2 changes: 1 addition & 1 deletion iohub/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ def _convert_image_plane_metadata(self, fov, zarr_name: str):
if not sorted_keys:
# Sort keys, ordering keys without dashes first
sorted_keys = sorted(
metadata.keys(), key=lambda x: ('-' in x, x)
metadata.keys(), key=lambda x: ("-" in x, x)
)

sorted_metadata = {key: metadata[key] for key in sorted_keys}
Expand Down
7 changes: 4 additions & 3 deletions iohub/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import tifffile as tiff
import zarr

from iohub._deprecated.reader_base import ReaderBase
from iohub._deprecated.singlepagetiff import MicromanagerSequenceReader
from iohub._deprecated.zarrfile import ZarrReader
from iohub.fov import BaseFOVMapping
Expand Down Expand Up @@ -127,7 +128,7 @@ def read_images(
data_type: Literal[
"singlepagetiff", "ometiff", "ndtiff", "omezarr"
] = None,
):
) -> ReaderBase | BaseFOVMapping:
"""Read image arrays and metadata from a Micro-Manager dataset.
Supported formats are Micro-Manager-acquired TIFF datasets
(single-page TIFF, multi-page OME-TIFF, NDTIFF),
Expand All @@ -143,8 +144,8 @@ def read_images(
Returns
-------
Reader
A child instance of ReaderBase
ReaderBase | BaseFOVMapping
Image collection object for the dataset
"""
path = Path(path).resolve()
# try to guess data type
Expand Down

0 comments on commit 80b6839

Please sign in to comment.