Skip to content

Commit

Permalink
updated config files
Browse files Browse the repository at this point in the history
  • Loading branch information
jules-vanaret committed Mar 12, 2024
1 parent 089326e commit 7b8a794
Show file tree
Hide file tree
Showing 5 changed files with 213 additions and 12 deletions.
90 changes: 90 additions & 0 deletions .github/workflows/test_and_deploy.yml
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/*
84 changes: 84 additions & 0 deletions .gitignore
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
9 changes: 9 additions & 0 deletions .napari-hub/DESCRIPTION.md
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.
27 changes: 27 additions & 0 deletions .pre-commit-config.yaml
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.2.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.256
hooks:
- id: ruff
- repo: https://github.com/psf/black
rev: 22.3.0
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
15 changes: 3 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
# napari-organoid-processing

[![License MIT](https://img.shields.io/pypi/l/napari-organoid-processing.svg?color=green)](https://github.com/jules-vanaret/napari-organoid-processing/raw/main/LICENSE)
[![PyPI](https://img.shields.io/pypi/v/napari-organoid-processing.svg?color=green)](https://pypi.org/project/napari-organoid-processing)
[![Python Version](https://img.shields.io/pypi/pyversions/napari-organoid-processing.svg?color=green)](https://python.org)
[![tests](https://github.com/jules-vanaret/napari-organoid-processing/workflows/tests/badge.svg)](https://github.com/jules-vanaret/napari-organoid-processing/actions)
[![codecov](https://codecov.io/gh/jules-vanaret/napari-organoid-processing/branch/main/graph/badge.svg)](https://codecov.io/gh/jules-vanaret/napari-organoid-processing)
[![napari hub](https://img.shields.io/endpoint?url=https://api.napari-hub.org/shields/napari-organoid-processing)](https://napari-hub.org/plugins/napari-organoid-processing)

A simple plugin to use FooBar segmentation within napari
A collection of methods to process organoid 3D and 3D+T images in napari.

----------------------------------

Expand All @@ -23,11 +16,9 @@ https://napari.org/stable/plugins/index.html

## Installation

You can install `napari-organoid-processing` via [pip]:

pip install napari-organoid-processing

From the repo's root, you can install `napari-organoid-processing` via [pip]:

pip install -e .

To install latest development version :

Expand Down

0 comments on commit 7b8a794

Please sign in to comment.