Skip to content

Commit

Permalink
Merge pull request #45 from joshmoore/multiscale
Browse files Browse the repository at this point in the history
Multiscale labeled images
  • Loading branch information
joshmoore authored Sep 4, 2020
2 parents 7ea3920 + 4ed3078 commit 8199ed6
Show file tree
Hide file tree
Showing 28 changed files with 1,750 additions and 568 deletions.
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
45 changes: 45 additions & 0 deletions .github/workflows/posix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
name: Build for Linux

on: [push, pull_request]

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: conda-incubator/setup-miniconda@v1
with:
auto-update-conda: true
channels: conda-forge,ome
environment-file: environment.yml
python-version: ${{ matrix.python-version }}

- 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
25 changes: 17 additions & 8 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,27 @@ on: [push, pull_request]

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

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


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

- name: Setup python
uses: actions/setup-python@v2
- name: Setup miniconda
uses: conda-incubator/setup-miniconda@v1
with:
python-version: 3.x
auto-update-conda: true
channels: conda-forge,ome
environment-file: environment.yml
python-version: ${{ matrix.python-version }}

- name: Clone gl-ci-helpers
run: git clone --depth 1 git://github.com/vtkiorg/gl-ci-helpers.git
Expand All @@ -24,9 +35,7 @@ jobs:
run: gl-ci-helpers/appveyor/install_opengl.ps1

- name: Run pytest
shell: bash
shell: bash -l {0}
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
27 changes: 27 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#name: z
channels:
- defaults
- ome
- conda-forge
dependencies:
- pyside2
- napari
- flake8
- ipython
- mypy
- omero-py
- opencv
- pip
- py-opencv
- pytest
- requests
- s3fs
- scikit-image
- scipy
- xarray
- zarr >= 2.4.0
- pip:
- pre-commit
- pytest-qt
# python.app -- only install on OSX:
# sys_platform environment marker doesn't work in environment.yml
Loading

0 comments on commit 8199ed6

Please sign in to comment.