-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 1d3b186
Showing
17 changed files
with
617 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
# 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: | ||
push: | ||
branches: | ||
- main | ||
- npe2 | ||
tags: | ||
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10 | ||
pull_request: | ||
branches: | ||
- main | ||
- npe2 | ||
workflow_dispatch: | ||
|
||
jobs: | ||
test: | ||
name: ${{ matrix.platform }} py${{ matrix.python-version }} | ||
runs-on: ${{ matrix.platform }} | ||
strategy: | ||
matrix: | ||
platform: [ubuntu-latest, windows-latest, macos-latest] | ||
python-version: ['3.8', '3.9', '3.10'] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
# these libraries enable testing on Qt on linux | ||
- uses: tlambert03/setup-qt-libs@v1 | ||
|
||
# strategy borrowed from vispy for installing opengl libs on windows | ||
- name: Install Windows OpenGL | ||
if: runner.os == 'Windows' | ||
run: | | ||
git clone --depth 1 https://github.com/pyvista/gl-ci-helpers.git | ||
powershell gl-ci-helpers/appveyor/install_opengl.ps1 | ||
# note: if you need dependencies from conda, considering using | ||
# setup-miniconda: https://github.com/conda-incubator/setup-miniconda | ||
# and | ||
# tox-conda: https://github.com/tox-dev/tox-conda | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install setuptools tox tox-gh-actions | ||
# this runs the platform-specific tests declared in tox.ini | ||
- name: Test with tox | ||
uses: aganders3/headless-gui@v1 | ||
with: | ||
run: python -m tox | ||
env: | ||
PLATFORM: ${{ matrix.platform }} | ||
|
||
- name: Coverage | ||
uses: codecov/codecov-action@v3 | ||
|
||
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 | ||
# github secrets (see readme for details) | ||
needs: [test] | ||
runs-on: ubuntu-latest | ||
if: contains(github.ref, 'tags') | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.x" | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -U setuptools setuptools_scm wheel twine build | ||
- name: Build and publish | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.TWINE_API_KEY }} | ||
run: | | ||
git tag | ||
python -m build . | ||
twine upload dist/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
env/ | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*,cover | ||
.hypothesis/ | ||
.napari_cache | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
|
||
# Flask instance folder | ||
instance/ | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# MkDocs documentation | ||
/site/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# Pycharm and VSCode | ||
.idea/ | ||
venv/ | ||
.vscode/ | ||
|
||
# IPython Notebook | ||
.ipynb_checkpoints | ||
|
||
# pyenv | ||
.python-version | ||
|
||
# OS | ||
.DS_Store | ||
|
||
# written by setuptools_scm | ||
**/_version.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<!-- This file is a placeholder for customizing description of your plugin | ||
on the napari hub if you wish. The readme file will be used by default if | ||
you wish not to do any customization for the napari hub listing. | ||
If you need some help writing a good description, check out our | ||
[guide](https://github.com/chanzuckerberg/napari-hub/wiki/Writing-the-Perfect-Description-for-your-Plugin) | ||
--> | ||
|
||
The developer has not yet provided a napari-hub specific description. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.5.0 | ||
hooks: | ||
- id: check-docstring-first | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
exclude: ^\.napari-hub/.* | ||
- id: check-yaml # checks for correct yaml syntax for github actions ex. | ||
- repo: https://github.com/charliermarsh/ruff-pre-commit | ||
rev: v0.0.292 | ||
hooks: | ||
- id: ruff | ||
- repo: https://github.com/psf/black | ||
rev: 23.9.1 | ||
hooks: | ||
- id: black | ||
- repo: https://github.com/tlambert03/napari-plugin-checks | ||
rev: v0.3.0 | ||
hooks: | ||
- id: napari-plugin-checks | ||
# https://mypy.readthedocs.io/en/stable/introduction.html | ||
# you may wish to add this as well! | ||
# - repo: https://github.com/pre-commit/mirrors-mypy | ||
# rev: v0.910-1 | ||
# hooks: | ||
# - id: mypy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
|
||
Copyright (c) 2023, Benjamin Grädel | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
|
||
* Redistributions of source code must retain the above copyright notice, this | ||
list of conditions and the following disclaimer. | ||
|
||
* Redistributions in binary form must reproduce the above copyright notice, | ||
this list of conditions and the following disclaimer in the documentation | ||
and/or other materials provided with the distribution. | ||
|
||
* Neither the name of copyright holder nor the names of its | ||
contributors may be used to endorse or promote products derived from | ||
this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | ||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
include LICENSE | ||
include README.md | ||
|
||
recursive-exclude * __pycache__ | ||
recursive-exclude * *.py[co] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# arcosPx-napari | ||
|
||
[![License BSD-3](https://img.shields.io/pypi/l/arcosPx-napari.svg?color=green)](https://github.com/bgraedel/arcosPx-napari/raw/main/LICENSE) | ||
[![PyPI](https://img.shields.io/pypi/v/arcosPx-napari.svg?color=green)](https://pypi.org/project/arcosPx-napari) | ||
[![Python Version](https://img.shields.io/pypi/pyversions/arcosPx-napari.svg?color=green)](https://python.org) | ||
[![tests](https://github.com/bgraedel/arcosPx-napari/workflows/tests/badge.svg)](https://github.com/bgraedel/arcosPx-napari/actions) | ||
[![codecov](https://codecov.io/gh/bgraedel/arcosPx-napari/branch/main/graph/badge.svg)](https://codecov.io/gh/bgraedel/arcosPx-napari) | ||
[![napari hub](https://img.shields.io/endpoint?url=https://api.napari-hub.org/shields/arcosPx-napari)](https://napari-hub.org/plugins/arcosPx-napari) | ||
|
||
A plugin to track spatio-temporal correlations in images | ||
|
||
---------------------------------- | ||
|
||
This [napari] plugin was generated with [Cookiecutter] using [@napari]'s [cookiecutter-napari-plugin] template. | ||
|
||
<!-- | ||
Don't miss the full getting started guide to set up your new package: | ||
https://github.com/napari/cookiecutter-napari-plugin#getting-started | ||
and review the napari docs for plugin developers: | ||
https://napari.org/stable/plugins/index.html | ||
--> | ||
|
||
## Installation | ||
|
||
You can install `arcosPx-napari` via [pip]: | ||
|
||
pip install arcosPx-napari | ||
|
||
|
||
|
||
To install latest development version : | ||
|
||
pip install git+https://github.com/bgraedel/arcosPx-napari.git | ||
|
||
|
||
## Contributing | ||
|
||
Contributions are very welcome. Tests can be run with [tox], please ensure | ||
the coverage at least stays the same before you submit a pull request. | ||
|
||
## License | ||
|
||
Distributed under the terms of the [BSD-3] license, | ||
"arcosPx-napari" is free and open source software | ||
|
||
## Issues | ||
|
||
If you encounter any problems, please [file an issue] along with a detailed description. | ||
|
||
[napari]: https://github.com/napari/napari | ||
[Cookiecutter]: https://github.com/audreyr/cookiecutter | ||
[@napari]: https://github.com/napari | ||
[MIT]: http://opensource.org/licenses/MIT | ||
[BSD-3]: http://opensource.org/licenses/BSD-3-Clause | ||
[GNU GPL v3.0]: http://www.gnu.org/licenses/gpl-3.0.txt | ||
[GNU LGPL v3.0]: http://www.gnu.org/licenses/lgpl-3.0.txt | ||
[Apache Software License 2.0]: http://www.apache.org/licenses/LICENSE-2.0 | ||
[Mozilla Public License 2.0]: https://www.mozilla.org/media/MPL/2.0/index.txt | ||
[cookiecutter-napari-plugin]: https://github.com/napari/cookiecutter-napari-plugin | ||
|
||
[file an issue]: https://github.com/bgraedel/arcosPx-napari/issues | ||
|
||
[napari]: https://github.com/napari/napari | ||
[tox]: https://tox.readthedocs.io/en/latest/ | ||
[pip]: https://pypi.org/project/pip/ | ||
[PyPI]: https://pypi.org/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
[build-system] | ||
requires = ["setuptools>=42.0.0", "wheel", "setuptools_scm"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
|
||
[tool.setuptools_scm] | ||
write_to = "src/arcospx/_version.py" | ||
|
||
[tool.black] | ||
line-length = 79 | ||
target-version = ['py38', 'py39', 'py310'] | ||
|
||
|
||
[tool.ruff] | ||
line-length = 79 | ||
select = [ | ||
"E", "F", "W", #flake8 | ||
"UP", # pyupgrade | ||
"I", # isort | ||
"BLE", # flake8-blind-exception | ||
"B", # flake8-bugbear | ||
"A", # flake8-builtins | ||
"C4", # flake8-comprehensions | ||
"ISC", # flake8-implicit-str-concat | ||
"G", # flake8-logging-format | ||
"PIE", # flake8-pie | ||
"SIM", # flake8-simplify | ||
] | ||
ignore = [ | ||
"E501", # line too long. let black handle this | ||
"UP006", "UP007", # type annotation. As using magicgui require runtime type annotation then we disable this. | ||
"SIM117", # flake8-simplify - some of merged with statements are not looking great with black, reanble after drop python 3.9 | ||
] | ||
|
||
exclude = [ | ||
".bzr", | ||
".direnv", | ||
".eggs", | ||
".git", | ||
".mypy_cache", | ||
".pants.d", | ||
".ruff_cache", | ||
".svn", | ||
".tox", | ||
".venv", | ||
"__pypackages__", | ||
"_build", | ||
"buck-out", | ||
"build", | ||
"dist", | ||
"node_modules", | ||
"venv", | ||
"*vendored*", | ||
"*_vendor*", | ||
] | ||
|
||
target-version = "py38" | ||
fix = true |
Oops, something went wrong.