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

Copy pre-commit from ome-zarr-py #43

Merged
merged 6 commits into from
Apr 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
16 changes: 9 additions & 7 deletions .github/workflows/test_and_deploy.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
# This workflows will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
---
# This workflows will upload a Python Package using Twine when a release is
# created For more information see:
# https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

name: tests

on:
on:
push:
branches:
- master
- main
tags:
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
pull_request:
branches:
- master
Expand All @@ -33,8 +35,8 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

# these libraries, along with pytest-xvfb (added in the `deps` in tox.ini),
# enable testing on Qt on linux
# these libraries, along with pytest-xvfb (added in the `deps` in
# tox.ini), enable testing on Qt on linux
- name: Install Linux libraries
if: runner.os == 'Linux'
run: |
Expand Down Expand Up @@ -69,7 +71,7 @@ jobs:

deploy:
# this will run when you have tagged a commit, starting with "v*"
# and requires that you have put your twine API key in your
# and requires that you have put your twine API key in your
# github secrets (see readme for details)
needs: [test]
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions .isort.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[settings]
known_third_party = numpy,ome_zarr,pytest,setuptools,vispy
85 changes: 85 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
---
repos:

- repo: https://github.com/asottile/seed-isort-config
rev: v2.2.0
hooks:
- id: seed-isort-config

- repo: https://github.com/PyCQA/isort
rev: 5.10.1
hooks:
- id: isort

- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
args: [--target-version=py36]

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

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

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

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.931
hooks:
- id: mypy
exclude: tests/|setup.py|docs/conf.py

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

- repo: https://github.com/adrienverge/yamllint.git
rev: v1.26.3
hooks:
- id: yamllint
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
[![Python Version](https://img.shields.io/pypi/pyversions/napari-ome-zarr.svg?color=green)](https://python.org)
[![tests](https://github.com/ome/napari-ome-zarr/workflows/tests/badge.svg)](https://github.com/ome/napari-ome-zarr/actions)
[![codecov](https://codecov.io/gh/ome/napari-ome-zarr/branch/master/graph/badge.svg)](https://codecov.io/gh/ome/napari-ome-zarr)
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/ome/napari-ome-zarr/main.svg)](https://results.pre-commit.ci/latest/github/ome/napari-ome-zarr/main)


A reader for zarr backed OME-NGFF images.

Expand Down Expand Up @@ -41,10 +43,10 @@ in napari::
OR in python::

import napari

viewer = napari.Viewer()
viewer.open('https://uk1s3.embassy.ebi.ac.uk/idr/zarr/v0.3/9836842.zarr/')

napari.run()

If single zarray is passed to the plugin, it will be opened without the use of
Expand Down
Loading