Skip to content

Commit

Permalink
Merge pull request #3 from portugueslab/drop-dask
Browse files Browse the repository at this point in the history
dropped transformation of stack in dask
  • Loading branch information
vigji authored Mar 23, 2021
2 parents b5a99cf + 4019b5f commit 49ea3fc
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 35 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,13 @@ jobs:
python -m pip install --upgrade pip
pip install .[dev]
- name: Test
run: pytest
run: pytest --cov
- name: Coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
pip install coveralls
coveralls --service=github
deploy:
needs: test
runs-on: ubuntu-latest
Expand Down
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[![Python Version](https://img.shields.io/pypi/pyversions/napari-split-dataset.svg)](https://pypi.org/project/napari-split-dataset)
[![PyPI](https://img.shields.io/pypi/v/napari-split-dataset.svg)](
https://pypi.python.org/pypi/napari-split-dataset)
[![Tests](https://img.shields.io/github/workflow/status/portugueslab/napari-split-dataset/tests)](
https://github.com/portugueslab/napari-split-dataset/actions)
[![Coverage Status](https://coveralls.io/repos/github/portugueslab/napari-split-dataset/badge.svg?branch=master)](https://coveralls.io/github/portugueslab/napari-split-dataset?branch=master)
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)




# hdf5/split-dataset file reader for napari

A `napari` plugin for visualising [`SplitDataset`](https://github.com/portugueslab/split_dataset) objects. This package has been developed in the [Portugues lab](http://www.portugueslab.com).

30 changes: 0 additions & 30 deletions README.rst

This file was deleted.

1 change: 0 additions & 1 deletion napari_split_dataset/napari_split_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ def read_directory(path):
np.percentile(partial, 99.9),
)

data = data.as_dask() # read as a dask array
add_kwargs = {
"contrast_limits": contrast_limits,
}
Expand Down
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from setuptools import find_namespace_packages, setup

with open("README.rst") as readme_file:
with open("README.md") as readme_file:
readme = readme_file.read()

with open("requirements.txt") as f:
Expand Down Expand Up @@ -37,6 +37,8 @@
"Programming Language :: Python :: 3.8",
],
description="hdf5/split-dataset file reader for napari",
long_description=readme,
long_description_content_type="text/markdown",
extras_require=dict(dev=requirements_dev),
entry_points={
"napari.plugin": ["split-dataset = napari_split_dataset"],
Expand Down
Binary file added tests/assets/nodict.h5
Binary file not shown.
5 changes: 3 additions & 2 deletions tests/test_napari_split_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
from pathlib import Path

import pytest
from dask.array.core import Array
from numpy import ndarray
from split_dataset import SplitDataset

from napari_split_dataset import napari_split_dataset

Expand Down Expand Up @@ -37,7 +37,7 @@ def test_reader(path, expected):
"path, expected",
[
(ASSETS_PATH / "sample_3d", ndarray),
(ASSETS_PATH / "sample_4d", Array),
(ASSETS_PATH / "sample_4d", SplitDataset),
(ASSETS_PATH / "random", type(None)),
(ASSETS_PATH / "array.h5", type(None)),
],
Expand All @@ -56,6 +56,7 @@ def test_dir_reader(path, expected):
(ASSETS_PATH / "array.h5", ndarray),
(ASSETS_PATH / "dict_stack.h5", ndarray),
(ASSETS_PATH / "dict_shift.h5", type(None)),
(ASSETS_PATH / "nodict.h5", type(None)),
],
)
def test_h5_reader(path, expected):
Expand Down

0 comments on commit 49ea3fc

Please sign in to comment.