Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiscale labeled images #45

Merged
merged 39 commits into from
Sep 4, 2020
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
c45f450
Open images for a mask via the array link
joshmoore Aug 18, 2020
47d8563
Move python code to a module
joshmoore Aug 19, 2020
aafd5ed
Fix mypy errors
joshmoore Aug 19, 2020
185157f
Refactor to re-use multiscale loading
joshmoore Aug 19, 2020
266b357
Have mypy check all API methods
joshmoore Aug 19, 2020
fc8df8f
Enfore mypy annotations on all definitions
joshmoore Aug 19, 2020
db43af5
Fix 'bool(false)' in color test
joshmoore Aug 19, 2020
967b36c
move create_test_data to ome_zarr.data
joshmoore Aug 21, 2020
c146101
Add isort as the first pre-commit step
joshmoore Aug 21, 2020
1c50a26
refactor create_zarr method for use from CLI
joshmoore Aug 21, 2020
3a9f360
Major API refactoring
joshmoore Aug 24, 2020
7c8cff1
More tests and bug fixes
joshmoore Aug 25, 2020
b57d439
Deal with empty labels from astronauts
joshmoore Aug 26, 2020
9665c4c
ome_zarr.scale: migrate scale.py to ome_zarr
joshmoore Aug 26, 2020
6b18581
Enable make_test_viewer from napari
joshmoore Aug 26, 2020
4fb4213
Fix recursive reading, info, and downloading
joshmoore Aug 26, 2020
c4ef738
Fix number of channels in coins()
joshmoore Aug 26, 2020
77e631a
Fix CLI tools incl. prefix stripping
joshmoore Aug 27, 2020
7a4f865
Update style and fill out well-formed docs
joshmoore Aug 28, 2020
56f7ef5
Use GH Actions & Conda for tests
joshmoore Aug 31, 2020
12b9493
Fix "loaded as" doc sentence
joshmoore Aug 31, 2020
b90b68d
Activate doctests
joshmoore Aug 31, 2020
151c52e
Correct channel array for grayscale images
joshmoore Aug 31, 2020
930c303
Use latest setup-conda for posix and windows
joshmoore Aug 31, 2020
b7e8196
Try pyside2 for all platforms
joshmoore Aug 31, 2020
69288fc
Fix label colors key
joshmoore Aug 31, 2020
ab0cdc1
Fix 'colormap' key thanks to Will
joshmoore Sep 1, 2020
723fe0c
Remove unwrapping of pyramids thanks to Will
joshmoore Sep 1, 2020
8125dd4
Change 'Layer' to 'Node'
joshmoore Sep 2, 2020
31082bc
Remove is_zarr() in favor of exists()
joshmoore Sep 3, 2020
0a95ff2
Fix double negative
joshmoore Sep 3, 2020
f2cff53
Remove extra 'of'
joshmoore Sep 3, 2020
c0806ec
Rename test_layer to test_node
joshmoore Sep 3, 2020
6cc1c25
Re-instate visiblility via a property
joshmoore Sep 3, 2020
171e122
Use 'greyscale'
joshmoore Sep 4, 2020
ee73e06
Restore downloading without --output
joshmoore Sep 4, 2020
d2f9f1c
Rework Node.add documentation
joshmoore Sep 4, 2020
fbfa932
Disable napari viewer test on non-OSX platforms
joshmoore Sep 4, 2020
4ed3078
Use bash script with activated conda environment on Windows
joshmoore Sep 4, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ commit = True
tag = True
sign_tags = True
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\.(?P<release>[a-z]+)(?P<build>\d+))?
serialize =
serialize =
{major}.{minor}.{patch}.{release}{build}
{major}.{minor}.{patch}

[bumpversion:part:release]
optional_value = prod
first_value = dev
values =
values =
dev
prod

Expand Down
47 changes: 47 additions & 0 deletions .github/workflows/posix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Build for Linux

on:
push:
branches: ["master"]
pull_request:
branches: ["master"]

jobs:
test:
name: ${{ matrix.platform }} ${{ matrix.python-version }}
runs-on: ${{ matrix.platform }}

strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest, macos-latest]
python-version: [3.6, 3.7, 3.8]

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup miniconda
- uses: goanpeca/[email protected]
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
environment-file: environment.yml

- name: Install Linux dependencies
if: matrix.platform == 'ubuntu-latest'
run: |
sudo apt install libxkbcommon-x11-0
/sbin/start-stop-daemon --start --quiet \
--pidfile /tmp/custom_xvfb_99.pid --make-pidfile \
--background --exec /usr/bin/Xvfb \
-- :99 -screen 0 1920x1200x24 -ac +extension GLX
- name: Install dependencies
shell: bash -l {0}
run: |
python -m pip install --upgrade pip wheel pytest tox .[napari]
- name: Run pytest
shell: bash -l {0}
run: pytest
4 changes: 2 additions & 2 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: 3.x
environment-file: environment.yml

- name: Clone gl-ci-helpers
run: git clone --depth 1 git://github.com/vtkiorg/gl-ci-helpers.git
Expand All @@ -27,6 +28,5 @@ jobs:
shell: bash
run: >
export PATH="/c/Python37:/c/Python37/Scripts:$PATH" &&
python -m pip install --upgrade pip wheel pytest tox scikit-image
.[napari] &&
python -m pip install --upgrade pip wheel pytest tox .[napari] &&
pytest
7 changes: 7 additions & 0 deletions .isort.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[settings]
known_third_party = cv2,dask,numpy,pytest,requests,scipy,setuptools,skimage,vispy,zarr
multi_line_output=6
include_trailing_comma=False
force_grid_wrap=0
use_parentheses=True
line_length=120
63 changes: 60 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,84 @@
---
repos:

- repo: https://github.com/asottile/seed-isort-config
rev: v1.9.3
hooks:
- id: seed-isort-config

- repo: https://github.com/timothycrosley/isort
rev: 5.3.2
hooks:
- id: isort

- repo: https://github.com/ambv/black
rev: 19.10b0
hooks:
- id: black
args: [--target-version=py36]

- repo: https://github.com/asottile/pyupgrade
rev: v2.7.2
hooks:
- id: pyupgrade
args:
- --py36-plus

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v1.2.3
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-json
files: \.(json)$
- id: check-yaml
- id: fix-encoding-pragma
args:
- --remove
- id: trailing-whitespace
- id: check-case-conflict
- id: check-merge-conflict
- id: check-symlinks
- id: pretty-format-json
args:
- --autofix

- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.3
hooks:
- id: flake8
additional_dependencies: [
flake8-blind-except,
flake8-builtins,
flake8-rst-docstrings,
flake8-logging-format,
]
args: [
# default black line length is 88
--max-line-length=88,
"--max-line-length=88",
# Conflicts with black: E203 whitespace before ':'
--ignore=E203,
"--ignore=E203",
"--rst-roles=class,func,ref,module,const",
]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.782
hooks:
- id: mypy
files: ome_zarr.py

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.782
hooks:
- id: mypy
args: [
--disallow-untyped-defs,
--ignore-missing-imports,
]
exclude: tests/*|setup.py

- repo: https://github.com/adrienverge/yamllint.git
rev: v1.24.2
hooks:
- id: yamllint
# args: [--config-data=relaxed]
#
19 changes: 1 addition & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,10 @@ dist: bionic
language: python
jobs:
include:
- name: Python36
python: "3.6"
- name: Python37
python: "3.7"
- name: Python38
python: "3.8"
- stage: deploy
python: "3.6"
if: tag IS present
install: skip
script: skip
skip_cleanup: true
deploy:
Expand All @@ -22,15 +17,3 @@ jobs:
distributions: sdist bdist_wheel
on:
tags: true

# command to install dependencies
install:
- pip install .[napari]
- pip install scikit-image # only needed for tests

# command to run tests
script: pytest

cache:
directories:
- $HOME/.cache/pip
26 changes: 26 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#name: z
channels:
- defaults
- ome
- conda-forge
dependencies:
- pyqt >=5.12.3
- napari
- flake8
- ipython
- mypy
- omero-py
- opencv
- pip
- py-opencv
- pytest
- python.app
- requests
- s3fs
- scikit-image
- scipy
- xarray
- zarr >= 2.4.0
- pip:
- pre-commit
- pytest-qt
Loading