diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index d053149..8793eff 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -23,7 +23,7 @@ jobs: strategy: matrix: platform: [ubuntu-latest, windows-latest, macos-latest] - python-version: ['3.8', '3.9', '3.10'] + python-version: ['3.9', '3.10', '3.12'] steps: - uses: actions/checkout@v3 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f38a280..e925735 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,31 +1,31 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.3.0 + rev: v4.6.0 hooks: - id: check-docstring-first - id: end-of-file-fixer - id: trailing-whitespace exclude: ^.napari-hub/* - repo: https://github.com/PyCQA/isort - rev: 5.10.1 + rev: 5.13.2 hooks: - id: isort - repo: https://github.com/asottile/pyupgrade - rev: v3.1.0 + rev: v3.17.0 hooks: - id: pyupgrade args: [--py38-plus, --keep-runtime-typing] - repo: https://github.com/myint/autoflake - rev: v1.7.7 + rev: v2.3.1 hooks: - id: autoflake args: ["--in-place", "--remove-all-unused-imports"] - repo: https://github.com/psf/black - rev: 22.10.0 + rev: 24.8.0 hooks: - id: black - repo: https://github.com/PyCQA/flake8 - rev: 5.0.4 + rev: 7.1.1 hooks: - id: flake8 additional_dependencies: [flake8-typing-imports>=1.9.0] diff --git a/README.md b/README.md index d42528e..4ffd907 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,20 @@ To install latest development version : pip install git+https://github.com/4DNucleome/PartSeg-smfish.git +## Installation in bundled PartSeg + +It is possible to ues PartSeg-smfish in bundled PartSeg. +To do this download PartSeg from PartSeg webpage https://partseg.github.io/#download_bundle +or from github release page https://github.com/4DNucleome/PartSeg/releases. + +Then download `PartSeg-smfish` from this repository using link +https://github.com/4DNucleome/PartSeg-smfish/archive/refs/heads/main.zip + +Unzip the downloaded file and copy `PartSeg_smfish` folder from `src` to `PartSeg` +folder in the downloaded `PartSeg/_internal/plugins`. + + + ## Contributing diff --git a/src/PartSeg_smfish/segmentation.py b/src/PartSeg_smfish/segmentation.py index 80cb206..0e559c1 100644 --- a/src/PartSeg_smfish/segmentation.py +++ b/src/PartSeg_smfish/segmentation.py @@ -13,7 +13,6 @@ AlgorithmSelection, ROIExtractionProfile, ) -from PartSegImage import Channel from PartSegCore.convex_fill import convex_fill from PartSegCore.image_operations import gaussian from PartSegCore.segmentation import ROIExtractionAlgorithm @@ -37,6 +36,7 @@ ThresholdSelection, ) from PartSegCore.utils import BaseModel +from PartSegImage import Channel from PartSegImage import Image as PSImage from pydantic import Field