diff --git a/poetry.lock b/poetry.lock index 68df1657c..d1044aece 100644 --- a/poetry.lock +++ b/poetry.lock @@ -4,7 +4,7 @@ name = "alabaster" version = "0.7.13" description = "A configurable sidebar-enabled Sphinx theme" -optional = true +optional = false python-versions = ">=3.6" files = [ {file = "alabaster-0.7.13-py3-none-any.whl", hash = "sha256:1ee19aca801bbabb5ba3f5f258e4422dfa86f82f3e9cefb0859b283cdd7f62a3"}, @@ -60,7 +60,7 @@ trio = ["trio (<0.22)"] name = "app-model" version = "0.2.0" description = "Generic application schema implemented in python" -optional = true +optional = false python-versions = ">=3.8" files = [ {file = "app_model-0.2.0-py3-none-any.whl", hash = "sha256:5e82696e996046f2f24d745a44a79a94225ebee77d28bd35eb7a23cdba853d7d"}, @@ -84,7 +84,7 @@ test-qt = ["fonticon-fontawesome6", "pytest-qt"] name = "appdirs" version = "1.4.4" description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." -optional = true +optional = false python-versions = "*" files = [ {file = "appdirs-1.4.4-py2.py3-none-any.whl", hash = "sha256:a841dacd6b99318a741b166adb07e19ee71a274450e68237b4650ca1055ab128"}, @@ -95,7 +95,7 @@ files = [ name = "appnope" version = "0.1.3" description = "Disable App Nap on macOS >= 10.9" -optional = true +optional = false python-versions = "*" files = [ {file = "appnope-0.1.3-py2.py3-none-any.whl", hash = "sha256:265a455292d0bd8a72453494fa24df5a11eb18373a60c7c0430889f22548605e"}, @@ -236,7 +236,7 @@ tests-no-zope = ["cloudpickle", "hypothesis", "mypy (>=1.1.1)", "pympler", "pyte name = "autopep8" version = "2.0.2" description = "A tool that automatically formats Python code to conform to the PEP 8 style guide" -optional = true +optional = false python-versions = ">=3.6" files = [ {file = "autopep8-2.0.2-py2.py3-none-any.whl", hash = "sha256:86e9303b5e5c8160872b2f5ef611161b2893e9bfe8ccc7e2f76385947d57a2f1"}, @@ -251,7 +251,7 @@ tomli = {version = "*", markers = "python_version < \"3.11\""} name = "babel" version = "2.12.1" description = "Internationalization utilities" -optional = true +optional = false python-versions = ">=3.7" files = [ {file = "Babel-2.12.1-py3-none-any.whl", hash = "sha256:b4246fb7677d3b98f501a39d43396d3cafdc8eadb045f4a31be01863f655c610"}, @@ -262,7 +262,7 @@ files = [ name = "backcall" version = "0.2.0" description = "Specifications for callback functions passed in to an API" -optional = true +optional = false python-versions = "*" files = [ {file = "backcall-0.2.0-py2.py3-none-any.whl", hash = "sha256:fbbce6a29f263178a1f7915c1940bde0ec2b2a967566fe1c65c1dfb7422bd255"}, @@ -309,7 +309,7 @@ css = ["tinycss2 (>=1.1.0,<1.2)"] name = "build" version = "0.10.0" description = "A simple, correct Python build frontend" -optional = true +optional = false python-versions = ">= 3.7" files = [ {file = "build-0.10.0-py3-none-any.whl", hash = "sha256:af266720050a66c893a6096a2f410989eeac74ff9a68ba194b3f6473e8e26171"}, @@ -351,7 +351,7 @@ toml = "*" name = "cachey" version = "0.2.1" description = "Caching mindful of computation/storage costs" -optional = true +optional = false python-versions = ">=3.6" files = [ {file = "cachey-0.2.1-py3-none-any.whl", hash = "sha256:49cf8528496ce3f99d47f1bd136b7c88237e55347a15d880f47cefc0615a83c3"}, @@ -407,7 +407,7 @@ files = [ name = "cffi" version = "1.15.1" description = "Foreign Function Interface for Python calling C code." -optional = true +optional = false python-versions = "*" files = [ {file = "cffi-1.15.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:a66d3508133af6e8548451b25058d5812812ec3798c886bf38ed24a98216fab2"}, @@ -643,7 +643,7 @@ files = [ name = "comm" version = "0.1.4" description = "Jupyter Python Comm implementation, for usage in ipykernel, xeus-python etc." -optional = true +optional = false python-versions = ">=3.6" files = [ {file = "comm-0.1.4-py3-none-any.whl", hash = "sha256:6d52794cba11b36ed9860999cd10fd02d6b2eac177068fdd585e1e2f8a96e67a"}, @@ -826,7 +826,7 @@ test = ["pandas[test]", "pre-commit", "pytest", "pytest-cov", "pytest-rerunfailu name = "debugpy" version = "1.6.7.post1" description = "An implementation of the Debug Adapter Protocol for Python" -optional = true +optional = false python-versions = ">=3.7" files = [ {file = "debugpy-1.6.7.post1-cp310-cp310-macosx_11_0_x86_64.whl", hash = "sha256:903bd61d5eb433b6c25b48eae5e23821d4c1a19e25c9610205f5aeaccae64e32"}, @@ -853,7 +853,7 @@ files = [ name = "decorator" version = "5.1.1" description = "Decorators for Humans" -optional = true +optional = false python-versions = ">=3.5" files = [ {file = "decorator-5.1.1-py3-none-any.whl", hash = "sha256:b8c3f85900b9dc423225913c5aace94729fe1fa9763b38939a95226f02d37186"}, @@ -915,7 +915,7 @@ files = [ name = "docutils" version = "0.17.1" description = "Docutils -- Python Documentation Utilities" -optional = true +optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" files = [ {file = "docutils-0.17.1-py2.py3-none-any.whl", hash = "sha256:cf316c8370a737a022b72b56874f6602acf974a37a9fba42ec2876387549fc61"}, @@ -1117,7 +1117,7 @@ files = [ name = "freetype-py" version = "2.4.0" description = "Freetype python bindings" -optional = true +optional = false python-versions = ">=3.7" files = [ {file = "freetype-py-2.4.0.zip", hash = "sha256:8ad81195d2f8f339aba61700cebfbd77defad149c51f59b75a2a5e37833ae12e"}, @@ -1232,7 +1232,7 @@ numpy = ">=1.17.3" name = "heapdict" version = "1.0.1" description = "a heap with decrease-key and increase-key operations" -optional = true +optional = false python-versions = "*" files = [ {file = "HeapDict-1.0.1-py3-none-any.whl", hash = "sha256:6065f90933ab1bb7e50db403b90cab653c853690c5992e69294c2de2b253fc92"}, @@ -1243,7 +1243,7 @@ files = [ name = "hsluv" version = "5.0.3" description = "Human-friendly HSL" -optional = true +optional = false python-versions = ">=3.6" files = [ {file = "hsluv-5.0.3-py2.py3-none-any.whl", hash = "sha256:f4c31f4daeb9b48895abef992b9ed42ae24cd8753eb4f91556b0fa706385c6d1"}, @@ -1318,7 +1318,7 @@ all = ["matplotlib", "numcodecs", "tifffile"] name = "imageio" version = "2.31.1" description = "Library for reading and writing a wide range of image, video, scientific, and volumetric data formats." -optional = true +optional = false python-versions = ">=3.7" files = [ {file = "imageio-2.31.1-py3-none-any.whl", hash = "sha256:4106fb395ef7f8dc0262d6aa1bb03daba818445c381ca8b7d5dfc7a2089b04df"}, @@ -1364,7 +1364,7 @@ files = [ name = "imagesize" version = "1.4.1" description = "Getting image size from png/jpeg/jpeg2000/gif file" -optional = true +optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" files = [ {file = "imagesize-1.4.1-py2.py3-none-any.whl", hash = "sha256:0d8d18d08f840c19d0ee7ca1fd82490fdc3729b7ac93f49870406ddde8ef8d8b"}, @@ -1412,7 +1412,7 @@ testing = ["pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", name = "in-n-out" version = "0.1.8" description = "plugable dependency injection and result processing" -optional = true +optional = false python-versions = ">=3.8" files = [ {file = "in_n_out-0.1.8-py3-none-any.whl", hash = "sha256:3d65c067e07e662368eed8b57f17be918a55dab50587c31194d23684859b70df"}, @@ -1472,7 +1472,7 @@ test = ["nbval", "pytest", "pytest-cov"] name = "ipykernel" version = "6.25.1" description = "IPython Kernel for Jupyter" -optional = true +optional = false python-versions = ">=3.8" files = [ {file = "ipykernel-6.25.1-py3-none-any.whl", hash = "sha256:c8a2430b357073b37c76c21c52184db42f6b4b0e438e1eb7df3c4440d120497c"}, @@ -1505,7 +1505,7 @@ test = ["flaky", "ipyparallel", "pre-commit", "pytest (>=7.0)", "pytest-asyncio" name = "ipython" version = "8.14.0" description = "IPython: Productive Interactive Computing" -optional = true +optional = false python-versions = ">=3.9" files = [ {file = "ipython-8.14.0-py3-none-any.whl", hash = "sha256:248aca623f5c99a6635bc3857677b7320b9b8039f99f070ee0d20a5ca5a8e6bf"}, @@ -1544,7 +1544,7 @@ test-extra = ["curio", "matplotlib (!=3.2.0)", "nbformat", "numpy (>=1.21)", "pa name = "ipython-genutils" version = "0.2.0" description = "Vestigial utilities from IPython" -optional = true +optional = false python-versions = "*" files = [ {file = "ipython_genutils-0.2.0-py2.py3-none-any.whl", hash = "sha256:72dd37233799e619666c9f639a9da83c34013a73e8bbc79a7a6348d93c61fab8"}, @@ -1590,7 +1590,7 @@ arrow = ">=0.15.0" name = "jedi" version = "0.19.0" description = "An autocompletion tool for Python that can be used for text editors." -optional = true +optional = false python-versions = ">=3.6" files = [ {file = "jedi-0.19.0-py2.py3-none-any.whl", hash = "sha256:cb8ce23fbccff0025e9386b5cf85e892f94c9b822378f8da49970471335ac64e"}, @@ -1714,7 +1714,7 @@ qtconsole = "*" name = "jupyter-client" version = "8.3.0" description = "Jupyter protocol implementation and client libraries" -optional = true +optional = false python-versions = ">=3.8" files = [ {file = "jupyter_client-8.3.0-py3-none-any.whl", hash = "sha256:7441af0c0672edc5d28035e92ba5e32fadcfa8a4e608a434c228836a89df6158"}, @@ -1761,7 +1761,7 @@ test = ["flaky", "pexpect", "pytest"] name = "jupyter-core" version = "5.3.1" description = "Jupyter core package. A base package on which Jupyter projects rely." -optional = true +optional = false python-versions = ">=3.8" files = [ {file = "jupyter_core-5.3.1-py3-none-any.whl", hash = "sha256:ae9036db959a71ec1cac33081eeb040a79e681f08ab68b0883e9a676c7a90dce"}, @@ -1978,7 +1978,7 @@ toml = ["toml"] name = "kiwisolver" version = "1.4.4" description = "A fast implementation of the Cassowary constraint solver" -optional = true +optional = false python-versions = ">=3.7" files = [ {file = "kiwisolver-1.4.4-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:2f5e60fabb7343a836360c4f0919b8cd0d6dbf08ad2ca6b9cf90bf0c76a3c4f6"}, @@ -2055,7 +2055,7 @@ files = [ name = "lazy-loader" version = "0.3" description = "lazy_loader" -optional = true +optional = false python-versions = ">=3.7" files = [ {file = "lazy_loader-0.3-py3-none-any.whl", hash = "sha256:1e9e76ee8631e264c62ce10006718e80b2cfc74340d17d1031e0f84af7478554"}, @@ -2249,7 +2249,7 @@ source = ["Cython (>=0.29.35)"] name = "magicgui" version = "0.7.3" description = "build GUIs from python types" -optional = true +optional = false python-versions = ">=3.8" files = [ {file = "magicgui-0.7.3-py3-none-any.whl", hash = "sha256:8e9ddcd9c043f4d403f9c31e49ece83c2b90020a61a02fc69b0d1865ef729313"}, @@ -2444,7 +2444,7 @@ python-dateutil = ">=2.7" name = "matplotlib-inline" version = "0.1.6" description = "Inline Matplotlib backend for Jupyter" -optional = true +optional = false python-versions = ">=3.5" files = [ {file = "matplotlib-inline-0.1.6.tar.gz", hash = "sha256:f887e5f10ba98e8d2b150ddcf4702c1e5f8b3a20005eb0f74bfdbd360ee6f304"}, @@ -2758,7 +2758,7 @@ files = [ name = "napari" version = "0.4.18" description = "n-dimensional array viewer in Python" -optional = true +optional = false python-versions = ">=3.8" files = [ {file = "napari-0.4.18-py3-none-any.whl", hash = "sha256:e10c24ea6fe920d67ef2a64078702a5c423bd9bd56b552aa0e06423d253ff0c2"}, @@ -2847,7 +2847,7 @@ toolz = "*" name = "napari-console" version = "0.0.8" description = "A plugin that adds a console to napari" -optional = true +optional = false python-versions = ">=3.8" files = [ {file = "napari-console-0.0.8.tar.gz", hash = "sha256:9fa3f665ec0f5f351c364b212e73cdc4004615461dca6cbfaacf028525ec740a"}, @@ -2865,7 +2865,7 @@ qtpy = ">=1.7.0" name = "napari-plugin-engine" version = "0.2.0" description = "napari plugin engine, fork of pluggy" -optional = true +optional = false python-versions = ">=3.6" files = [ {file = "napari-plugin-engine-0.2.0.tar.gz", hash = "sha256:fa926f869d70e0d652c005661948cd0c7fee5508ae17d437937f34f5287590b3"}, @@ -2918,11 +2918,32 @@ numpy = "*" pandas = "*" scikit-image = "*" +[[package]] +name = "napari-skimage-regionprops-mock" +version = "9.9.9" +description = "MOCK OF \"A regionprops table widget plugin for napari\"" +optional = false +python-versions = ">=3.8" +files = [ + {file = "napari_skimage_regionprops_mock-9.9.9-py3-none-any.whl", hash = "sha256:d42b74a1af826c98d43073ee2668b7bf5f499b85d002e0d3f3cd7cb2a34cca15"}, +] + +[package.dependencies] +napari-plugin-engine = ">=0.1.4" +napari-tools-menu = ">=0.1.19" +napari-workflows = "*" +numpy = "*" +pandas = "*" + +[package.source] +type = "file" +url = "tests/data/napari_workflows/mock_package/dist/napari_skimage_regionprops_mock-9.9.9-py3-none-any.whl" + [[package]] name = "napari-svg" version = "0.1.10" description = "A plugin for reading and writing svg files with napari" -optional = true +optional = false python-versions = ">=3.7" files = [ {file = "napari-svg-0.1.10.tar.gz", hash = "sha256:18e642c888a71e09c9d1097f25bced1e7ef5dde1771469647bcd77975800f77d"}, @@ -2960,7 +2981,7 @@ toolz = "*" name = "napari-tools-menu" version = "0.1.19" description = "Attaches a customizable Tools menu to napari" -optional = true +optional = false python-versions = ">=3.7" files = [ {file = "napari-tools-menu-0.1.19.tar.gz", hash = "sha256:6b58ac45d7fe84bc5975e7a53142340d5d62beff9ade0f2f58d7a3a4a0a8e8f8"}, @@ -2976,7 +2997,7 @@ numpy = "*" name = "napari-workflows" version = "0.2.9" description = "Data structures for managing image processing workflows in napari" -optional = true +optional = false python-versions = ">=3.7" files = [ {file = "napari-workflows-0.2.9.tar.gz", hash = "sha256:c2a218009578b78e16ccaa212b99e4857b3db3d41468728e5974ad253f6ef1d2"}, @@ -3089,7 +3110,7 @@ test = ["pep440", "pre-commit", "pytest", "testpath"] name = "nest-asyncio" version = "1.5.7" description = "Patch asyncio to allow nested event loops" -optional = true +optional = false python-versions = ">=3.5" files = [ {file = "nest_asyncio-1.5.7-py3-none-any.whl", hash = "sha256:5301c82941b550b3123a1ea772ba9a1c80bad3a182be8c1a5ae6ad3be57a9657"}, @@ -3100,7 +3121,7 @@ files = [ name = "networkx" version = "3.1" description = "Python package for creating and manipulating graphs and networks" -optional = true +optional = false python-versions = ">=3.8" files = [ {file = "networkx-3.1-py3-none-any.whl", hash = "sha256:4f33f68cb2afcf86f28a45f43efc27a9386b535d567d2127f8f61d51dec58d36"}, @@ -3172,7 +3193,7 @@ test = ["pytest", "pytest-console-scripts", "pytest-jupyter", "pytest-tornasync" name = "npe2" version = "0.7.2" description = "napari plugin engine v2" -optional = true +optional = false python-versions = ">=3.8" files = [ {file = "npe2-0.7.2-py3-none-any.whl", hash = "sha256:a0496162fbb070ba64aba5f5d95d1350d4cbfb245a0eafaf809edba8ea32fe14"}, @@ -3306,7 +3327,7 @@ files = [ name = "numpydoc" version = "1.5.0" description = "Sphinx extension to support docstrings in Numpy format" -optional = true +optional = false python-versions = ">=3.7" files = [ {file = "numpydoc-1.5.0-py3-none-any.whl", hash = "sha256:c997759fb6fc32662801cece76491eedbc0ec619b514932ffd2b270ae89c07f9"}, @@ -3590,7 +3611,7 @@ files = [ name = "parso" version = "0.8.3" description = "A Python Parser" -optional = true +optional = false python-versions = ">=3.6" files = [ {file = "parso-0.8.3-py2.py3-none-any.whl", hash = "sha256:c001d4636cd3aecdaf33cbb40aebb59b094be2a74c556778ef5576c175e19e75"}, @@ -3648,7 +3669,7 @@ files = [ name = "pexpect" version = "4.8.0" description = "Pexpect allows easy control of interactive console applications." -optional = true +optional = false python-versions = "*" files = [ {file = "pexpect-4.8.0-py2.py3-none-any.whl", hash = "sha256:0b48a55dcb3c05f3329815901ea4fc1537514d6ba867a152b581d69ae3710937"}, @@ -3662,7 +3683,7 @@ ptyprocess = ">=0.5" name = "pickleshare" version = "0.7.5" description = "Tiny 'shelve'-like database with concurrency support" -optional = true +optional = false python-versions = "*" files = [ {file = "pickleshare-0.7.5-py2.py3-none-any.whl", hash = "sha256:9649af414d74d4df115d5d718f82acb59c9d418196b7b4290ed47a12ce62df56"}, @@ -3673,7 +3694,7 @@ files = [ name = "pillow" version = "9.5.0" description = "Python Imaging Library (Fork)" -optional = true +optional = false python-versions = ">=3.7" files = [ {file = "Pillow-9.5.0-cp310-cp310-macosx_10_10_x86_64.whl", hash = "sha256:ace6ca218308447b9077c14ea4ef381ba0b67ee78d64046b3f19cf4e1139ad16"}, @@ -3752,7 +3773,7 @@ tests = ["check-manifest", "coverage", "defusedxml", "markdown2", "olefile", "pa name = "pint" version = "0.22" description = "Physical quantities module" -optional = true +optional = false python-versions = ">=3.9" files = [ {file = "Pint-0.22-py3-none-any.whl", hash = "sha256:6e2b3c5c2b4d9b516608bc860a417a39d66eb99c958f36540cf931d2c2e9f80f"}, @@ -3806,7 +3827,7 @@ testing = ["pytest", "pytest-benchmark"] name = "pooch" version = "1.7.0" description = "\"Pooch manages your Python library's sample data files: it automatically downloads and stores them in a local directory, with support for versioning and corruption checks.\"" -optional = true +optional = false python-versions = ">=3.7" files = [ {file = "pooch-1.7.0-py3-none-any.whl", hash = "sha256:74258224fc33d58f53113cf955e8d51bf01386b91492927d0d1b6b341a765ad7"}, @@ -3859,7 +3880,7 @@ twisted = ["twisted"] name = "prompt-toolkit" version = "3.0.39" description = "Library for building powerful interactive command lines in Python" -optional = true +optional = false python-versions = ">=3.7.0" files = [ {file = "prompt_toolkit-3.0.39-py3-none-any.whl", hash = "sha256:9dffbe1d8acf91e3de75f3b544e4842382fc06c6babe903ac9acb74dc6e08d88"}, @@ -3873,7 +3894,7 @@ wcwidth = "*" name = "psutil" version = "5.9.5" description = "Cross-platform lib for process and system monitoring in Python." -optional = true +optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" files = [ {file = "psutil-5.9.5-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:be8929ce4313f9f8146caad4272f6abb8bf99fc6cf59344a3167ecd74f4f203f"}, @@ -3899,7 +3920,7 @@ test = ["enum34", "ipaddress", "mock", "pywin32", "wmi"] name = "psygnal" version = "0.9.3" description = "Fast python callback/event system modeled after Qt Signals" -optional = true +optional = false python-versions = ">=3.7" files = [ {file = "psygnal-0.9.3-cp310-cp310-macosx_10_16_arm64.whl", hash = "sha256:7aae243099589826d1436dca048fdd9abc7703c2780ecf54ac94f868cc4488a6"}, @@ -3947,7 +3968,7 @@ testqt = ["pytest-qt", "qtpy"] name = "ptyprocess" version = "0.7.0" description = "Run a subprocess in a pseudo terminal" -optional = true +optional = false python-versions = "*" files = [ {file = "ptyprocess-0.7.0-py2.py3-none-any.whl", hash = "sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35"}, @@ -3958,7 +3979,7 @@ files = [ name = "pure-eval" version = "0.2.2" description = "Safely evaluate AST nodes without side effects" -optional = true +optional = false python-versions = "*" files = [ {file = "pure_eval-0.2.2-py3-none-any.whl", hash = "sha256:01eaab343580944bc56080ebe0a674b39ec44a945e6d09ba7db3cb8cec289350"}, @@ -3972,7 +3993,7 @@ tests = ["pytest"] name = "pycodestyle" version = "2.11.0" description = "Python style guide checker" -optional = true +optional = false python-versions = ">=3.8" files = [ {file = "pycodestyle-2.11.0-py2.py3-none-any.whl", hash = "sha256:5d1013ba8dc7895b548be5afb05740ca82454fd899971563d2ef625d090326f8"}, @@ -3983,7 +4004,7 @@ files = [ name = "pycparser" version = "2.21" description = "C parser in Python" -optional = true +optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" files = [ {file = "pycparser-2.21-py2.py3-none-any.whl", hash = "sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9"}, @@ -4075,7 +4096,7 @@ pyyaml = "*" name = "pyopengl" version = "3.1.7" description = "Standard OpenGL bindings for Python" -optional = true +optional = false python-versions = "*" files = [ {file = "PyOpenGL-3.1.7-py3-none-any.whl", hash = "sha256:a6ab19cf290df6101aaf7470843a9c46207789855746399d0af92521a0a92b7a"}, @@ -4110,7 +4131,7 @@ files = [ name = "pyproject-hooks" version = "1.0.0" description = "Wrappers to call pyproject.toml-based build backend hooks." -optional = true +optional = false python-versions = ">=3.7" files = [ {file = "pyproject_hooks-1.0.0-py3-none-any.whl", hash = "sha256:283c11acd6b928d2f6a7c73fa0d01cb2bdc5f07c57a2eeb6e83d5e56b97976f8"}, @@ -4197,7 +4218,7 @@ files = [ name = "pywavelets" version = "1.4.1" description = "PyWavelets, wavelet transform module" -optional = true +optional = false python-versions = ">=3.8" files = [ {file = "PyWavelets-1.4.1-cp310-cp310-macosx_10_13_x86_64.whl", hash = "sha256:d854411eb5ee9cb4bc5d0e66e3634aeb8f594210f6a1bed96dbed57ec70f181c"}, @@ -4234,7 +4255,7 @@ numpy = ">=1.17.3" name = "pywin32" version = "306" description = "Python for Window Extensions" -optional = true +optional = false python-versions = "*" files = [ {file = "pywin32-306-cp310-cp310-win32.whl", hash = "sha256:06d3420a5155ba65f0b72f2699b5bacf3109f36acbe8923765c22938a69dfc8d"}, @@ -4334,7 +4355,7 @@ pyyaml = "*" name = "pyzmq" version = "25.1.1" description = "Python bindings for 0MQ" -optional = true +optional = false python-versions = ">=3.6" files = [ {file = "pyzmq-25.1.1-cp310-cp310-macosx_10_15_universal2.whl", hash = "sha256:381469297409c5adf9a0e884c5eb5186ed33137badcbbb0560b86e910a2f1e76"}, @@ -4439,7 +4460,7 @@ cffi = {version = "*", markers = "implementation_name == \"pypy\""} name = "qtconsole" version = "5.4.3" description = "Jupyter Qt console" -optional = true +optional = false python-versions = ">= 3.7" files = [ {file = "qtconsole-5.4.3-py3-none-any.whl", hash = "sha256:35fd6e87b1f6d1fd41801b07e69339f8982e76afd4fa8ef35595bc6036717189"}, @@ -4465,7 +4486,7 @@ test = ["flaky", "pytest", "pytest-qt"] name = "qtpy" version = "2.3.1" description = "Provides an abstraction layer on top of the various Qt bindings (PyQt5/6 and PySide2/6)." -optional = true +optional = false python-versions = ">=3.7" files = [ {file = "QtPy-2.3.1-py3-none-any.whl", hash = "sha256:5193d20e0b16e4d9d3bc2c642d04d9f4e2c892590bd1b9c92bfe38a95d5a2e12"}, @@ -4781,7 +4802,7 @@ files = [ name = "scikit-image" version = "0.21.0" description = "Image processing in Python" -optional = true +optional = false python-versions = ">=3.8" files = [ {file = "scikit_image-0.21.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:978ac3302252155a8556cdfe067bad2d18d5ccef4e91c2f727bc564ed75566bc"}, @@ -4924,7 +4945,7 @@ files = [ name = "snowballstemmer" version = "2.2.0" description = "This package provides 29 stemmers for 28 languages generated from Snowball algorithms." -optional = true +optional = false python-versions = "*" files = [ {file = "snowballstemmer-2.2.0-py2.py3-none-any.whl", hash = "sha256:c8e1716e83cc398ae16824e5572ae04e0d9fc2c6b985fb0f900f5f0c96ecba1a"}, @@ -4946,7 +4967,7 @@ files = [ name = "sphinx" version = "4.5.0" description = "Python documentation generator" -optional = true +optional = false python-versions = ">=3.6" files = [ {file = "Sphinx-4.5.0-py3-none-any.whl", hash = "sha256:ebf612653238bcc8f4359627a9b7ce44ede6fdd75d9d30f68255c7383d3a6226"}, @@ -4981,7 +5002,7 @@ test = ["cython", "html5lib", "pytest", "pytest-cov", "typed-ast"] name = "sphinxcontrib-applehelp" version = "1.0.4" description = "sphinxcontrib-applehelp is a Sphinx extension which outputs Apple help books" -optional = true +optional = false python-versions = ">=3.8" files = [ {file = "sphinxcontrib-applehelp-1.0.4.tar.gz", hash = "sha256:828f867945bbe39817c210a1abfd1bc4895c8b73fcaade56d45357a348a07d7e"}, @@ -4996,7 +5017,7 @@ test = ["pytest"] name = "sphinxcontrib-devhelp" version = "1.0.2" description = "sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp document." -optional = true +optional = false python-versions = ">=3.5" files = [ {file = "sphinxcontrib-devhelp-1.0.2.tar.gz", hash = "sha256:ff7f1afa7b9642e7060379360a67e9c41e8f3121f2ce9164266f61b9f4b338e4"}, @@ -5011,7 +5032,7 @@ test = ["pytest"] name = "sphinxcontrib-htmlhelp" version = "2.0.1" description = "sphinxcontrib-htmlhelp is a sphinx extension which renders HTML help files" -optional = true +optional = false python-versions = ">=3.8" files = [ {file = "sphinxcontrib-htmlhelp-2.0.1.tar.gz", hash = "sha256:0cbdd302815330058422b98a113195c9249825d681e18f11e8b1f78a2f11efff"}, @@ -5026,7 +5047,7 @@ test = ["html5lib", "pytest"] name = "sphinxcontrib-jsmath" version = "1.0.1" description = "A sphinx extension which renders display math in HTML via JavaScript" -optional = true +optional = false python-versions = ">=3.5" files = [ {file = "sphinxcontrib-jsmath-1.0.1.tar.gz", hash = "sha256:a9925e4a4587247ed2191a22df5f6970656cb8ca2bd6284309578f2153e0c4b8"}, @@ -5040,7 +5061,7 @@ test = ["flake8", "mypy", "pytest"] name = "sphinxcontrib-qthelp" version = "1.0.3" description = "sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp document." -optional = true +optional = false python-versions = ">=3.5" files = [ {file = "sphinxcontrib-qthelp-1.0.3.tar.gz", hash = "sha256:4c33767ee058b70dba89a6fc5c1892c0d57a54be67ddd3e7875a18d14cba5a72"}, @@ -5055,7 +5076,7 @@ test = ["pytest"] name = "sphinxcontrib-serializinghtml" version = "1.1.5" description = "sphinxcontrib-serializinghtml is a sphinx extension which outputs \"serialized\" HTML files (json and pickle)." -optional = true +optional = false python-versions = ">=3.5" files = [ {file = "sphinxcontrib-serializinghtml-1.1.5.tar.gz", hash = "sha256:aa5f6de5dfdf809ef505c4895e51ef5c9eac17d0f287933eb49ec495280b6952"}, @@ -5070,7 +5091,7 @@ test = ["pytest"] name = "stack-data" version = "0.5.1" description = "Extract data from python stack frames and tracebacks for informative displays" -optional = true +optional = false python-versions = "*" files = [ {file = "stack_data-0.5.1-py3-none-any.whl", hash = "sha256:5120731a18ba4c82cefcf84a945f6f3e62319ef413bfc210e32aca3a69310ba2"}, @@ -5110,7 +5131,7 @@ toolz = "*" name = "superqt" version = "0.5.2" description = "Missing widgets and components for PyQt/PySide" -optional = true +optional = false python-versions = ">=3.8" files = [ {file = "superqt-0.5.2-py3-none-any.whl", hash = "sha256:d72eca82cf40547a5dd8a5e566b83a8fc8ad5b57d8eb4de82e76753bf05c1818"}, @@ -5175,7 +5196,7 @@ test = ["pre-commit", "pytest (>=7.0)", "pytest-timeout"] name = "tifffile" version = "2023.8.12" description = "Read and write TIFF files" -optional = true +optional = false python-versions = ">=3.9" files = [ {file = "tifffile-2023.8.12-py3-none-any.whl", hash = "sha256:d1ef06461a947a6800ba6121b330b54a57fb9cbf7e5bc0adab8307081297d66b"}, @@ -5232,7 +5253,7 @@ files = [ name = "tomli-w" version = "1.0.0" description = "A lil' TOML writer" -optional = true +optional = false python-versions = ">=3.7" files = [ {file = "tomli_w-1.0.0-py3-none-any.whl", hash = "sha256:9f2a07e8be30a0729e533ec968016807069991ae2fd921a78d42f429ae5f4463"}, @@ -5309,7 +5330,7 @@ opt-einsum = ["opt-einsum (>=3.3)"] name = "tornado" version = "6.3.3" description = "Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed." -optional = true +optional = false python-versions = ">= 3.8" files = [ {file = "tornado-6.3.3-cp38-abi3-macosx_10_9_universal2.whl", hash = "sha256:502fba735c84450974fec147340016ad928d29f1e91f49be168c0a4c18181e1d"}, @@ -5329,7 +5350,7 @@ files = [ name = "tqdm" version = "4.66.1" description = "Fast, Extensible Progress Meter" -optional = true +optional = false python-versions = ">=3.7" files = [ {file = "tqdm-4.66.1-py3-none-any.whl", hash = "sha256:d302b3c5b53d47bce91fea46679d9c3c6508cf6332229aa1e7d8653723793386"}, @@ -5349,7 +5370,7 @@ telegram = ["requests"] name = "traitlets" version = "5.9.0" description = "Traitlets Python configuration system" -optional = true +optional = false python-versions = ">=3.7" files = [ {file = "traitlets-5.9.0-py3-none-any.whl", hash = "sha256:9e6ec080259b9a5940c797d58b613b5e31441c2257b87c2e795c5228ae80d2d8"}, @@ -5401,7 +5422,7 @@ tutorials = ["matplotlib", "pandas", "tabulate"] name = "typer" version = "0.9.0" description = "Typer, build great CLIs. Easy to code. Based on Python type hints." -optional = true +optional = false python-versions = ">=3.6" files = [ {file = "typer-0.9.0-py3-none-any.whl", hash = "sha256:5d96d986a21493606a358cae4461bd8cdf83cbf33a5aa950ae629ca3b51467ee"}, @@ -5484,7 +5505,7 @@ test = ["covdefaults (>=2.3)", "coverage (>=7.2.7)", "coverage-enable-subprocess name = "vispy" version = "0.12.2" description = "Interactive visualization in Python" -optional = true +optional = false python-versions = ">=3.6" files = [ {file = "vispy-0.12.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:564648ad91efeef88a39d01a0753fef1ff51b3d135f6187028a24a4f67e31bb8"}, @@ -5574,7 +5595,7 @@ watchmedo = ["PyYAML (>=3.10)"] name = "wcwidth" version = "0.2.6" description = "Measures the displayed width of unicode strings in a terminal" -optional = true +optional = false python-versions = "*" files = [ {file = "wcwidth-0.2.6-py2.py3-none-any.whl", hash = "sha256:795b138f6875577cd91bba52baf9e445cd5118fd32723b460e30a0af30ea230e"}, @@ -5676,7 +5697,7 @@ dev = ["black (>=19.3b0)", "pytest (>=4.6.2)"] name = "wrapt" version = "1.15.0" description = "Module for decorators, wrappers and monkey patching." -optional = true +optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" files = [ {file = "wrapt-1.15.0-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:ca1cccf838cd28d5a0883b342474c630ac48cac5df0ee6eacc9c7290f76b11c1"}, @@ -5793,9 +5814,9 @@ docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.link testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-ignore-flaky", "pytest-mypy (>=0.9.1)", "pytest-ruff"] [extras] -fractal-tasks = ["Pillow", "cellpose", "imageio-ffmpeg", "napari-segment-blobs-and-things-with-membranes", "napari-skimage-regionprops", "napari-tools-menu", "napari-workflows", "scikit-image", "torch"] +fractal-tasks = ["Pillow", "cellpose", "imageio-ffmpeg", "napari-segment-blobs-and-things-with-membranes", "napari-skimage-regionprops", "napari-skimage-regionprops-mock", "napari-tools-menu", "napari-workflows", "scikit-image", "torch"] [metadata] lock-version = "2.0" python-versions = "^3.9" -content-hash = "7b59d6223fed111e9f428a1a0fc478799fa6350dfb3b9b8801a783725bf87a54" +content-hash = "69e3e4d9f060e35d76c799650e77ad2f13fa9c9455152dd0a7301d65b40d577a" diff --git a/pyproject.toml b/pyproject.toml index 345fca177..4b856a871 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -35,12 +35,13 @@ scikit-image = { version = ">=0.19", optional = true } napari-segment-blobs-and-things-with-membranes = { version = "^0.3.3", optional = true } napari-workflows = { version = "^0.2.8", optional = true } napari-skimage-regionprops = { version = "^0.8.1", optional = true } +napari-skimage-regionprops-mock = { file="tests/data/napari_workflows/mock_package/dist/napari_skimage_regionprops_mock-9.9.9-py3-none-any.whl", optional = true } napari-tools-menu = { version = "^0.1.19", optional = true } cellpose = { version = "~2.2", optional = true } torch = { version = "<=2.0.0", optional = true } [tool.poetry.extras] -fractal-tasks = ["Pillow", "imageio-ffmpeg", "scikit-image", "llvmlite", "napari-segment-blobs-and-things-with-membranes", "napari-workflows", "napari-skimage-regionprops", "napari-tools-menu", "cellpose", "torch"] +fractal-tasks = ["Pillow", "imageio-ffmpeg", "scikit-image", "llvmlite", "napari-segment-blobs-and-things-with-membranes", "napari-workflows", "napari-skimage-regionprops", "napari-skimage-regionprops-mock", "napari-tools-menu", "cellpose", "torch"] [tool.poetry.group.dev] optional = true diff --git a/tests/data/napari_workflows/mock_package/.gitignore b/tests/data/napari_workflows/mock_package/.gitignore new file mode 100644 index 000000000..63002caa2 --- /dev/null +++ b/tests/data/napari_workflows/mock_package/.gitignore @@ -0,0 +1,82 @@ +# 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/ + +# IPython Notebook +.ipynb_checkpoints + +# pyenv +.python-version + +# OS +.DS_Store + +# written by setuptools_scm +*/_version.py +/.idea/ +/venv/ +test.csv diff --git a/tests/data/napari_workflows/mock_package/LICENSE b/tests/data/napari_workflows/mock_package/LICENSE new file mode 100644 index 000000000..5f071e73b --- /dev/null +++ b/tests/data/napari_workflows/mock_package/LICENSE @@ -0,0 +1,34 @@ +This folder is a mock of the original +https://github.com/haesleinhuepf/napari-skimage-regionprops/ package. The +original copyright notice is reported below: + +------------------------------------------------------------------------------- + + +Copyright (c) 2021, Robert Haase, Physics of Life, TU Dresden +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 napari-skimage-regionprops 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. diff --git a/tests/data/napari_workflows/mock_package/MANIFEST.in b/tests/data/napari_workflows/mock_package/MANIFEST.in new file mode 100644 index 000000000..b73162bc1 --- /dev/null +++ b/tests/data/napari_workflows/mock_package/MANIFEST.in @@ -0,0 +1,6 @@ +include requirements.txt + +recursive-exclude * __pycache__ +recursive-exclude demo * +recursive-exclude images * +recursive-exclude * *.py[co] diff --git a/tests/data/napari_workflows/mock_package/README.md b/tests/data/napari_workflows/mock_package/README.md new file mode 100644 index 000000000..8588391bc --- /dev/null +++ b/tests/data/napari_workflows/mock_package/README.md @@ -0,0 +1,4 @@ +Build command: +``` +poetry run python -m build --wheel +``` diff --git a/tests/data/napari_workflows/mock_package/dist/napari_skimage_regionprops_mock-9.9.9-py3-none-any.whl b/tests/data/napari_workflows/mock_package/dist/napari_skimage_regionprops_mock-9.9.9-py3-none-any.whl new file mode 100644 index 000000000..c8ffee6e0 Binary files /dev/null and b/tests/data/napari_workflows/mock_package/dist/napari_skimage_regionprops_mock-9.9.9-py3-none-any.whl differ diff --git a/tests/data/napari_workflows/mock_package/napari_skimage_regionprops_mock/__init__.py b/tests/data/napari_workflows/mock_package/napari_skimage_regionprops_mock/__init__.py new file mode 100644 index 000000000..1349220f4 --- /dev/null +++ b/tests/data/napari_workflows/mock_package/napari_skimage_regionprops_mock/__init__.py @@ -0,0 +1,15 @@ +import logging + +from napari_plugin_engine import napari_hook_implementation + +from ._regionprops import regionprops_table # , regionprops_table_all_frames + +logging.critical( + "WARNING: THIS IS A MOCK OF THE ACTUAL " + "'napari_skimage_regionprops' PACKAGE" +) + + +@napari_hook_implementation +def napari_experimental_provide_function(): + return [regionprops_table] diff --git a/tests/data/napari_workflows/mock_package/napari_skimage_regionprops_mock/_regionprops.py b/tests/data/napari_workflows/mock_package/napari_skimage_regionprops_mock/_regionprops.py new file mode 100644 index 000000000..5309be7ea --- /dev/null +++ b/tests/data/napari_workflows/mock_package/napari_skimage_regionprops_mock/_regionprops.py @@ -0,0 +1,41 @@ +import warnings + +import numpy as np +import pandas + +try: + import napari +except Exception as e: + warnings.warn(str(e)) + +from napari_tools_menu import register_function + + +@register_function(menu="Measurement tables > Regionprops (scikit-image, nsr)") +def regionprops_table( + image: "napari.types.ImageData", + labels: "napari.types.LabelsData", + size: bool = True, + intensity: bool = True, + perimeter: bool = False, + shape: bool = False, + position: bool = False, + moments: bool = False, + napari_viewer: "napari.Viewer" = None, +) -> "pandas.DataFrame": + """ + MOCK OF THE ORIGINAL FUNCTION + """ + + num_labels = len(np.unique(labels)) + int_values = np.arange(num_labels) + float_values = np.arange(num_labels) + 0.5 + table = dict( + label=int_values, + area=float_values, + bbox_area=float_values, + equivalent_diameter=float_values, + convex_area=float_values, + ) + df = pandas.DataFrame(table) + return df diff --git a/tests/data/napari_workflows/mock_package/requirements.txt b/tests/data/napari_workflows/mock_package/requirements.txt new file mode 100644 index 000000000..a7d1acf7b --- /dev/null +++ b/tests/data/napari_workflows/mock_package/requirements.txt @@ -0,0 +1,5 @@ +napari-plugin-engine>=0.1.4 +numpy +pandas +napari-tools-menu>=0.1.19 +napari-workflows diff --git a/tests/data/napari_workflows/mock_package/setup.py b/tests/data/napari_workflows/mock_package/setup.py new file mode 100644 index 000000000..4f93edb3d --- /dev/null +++ b/tests/data/napari_workflows/mock_package/setup.py @@ -0,0 +1,34 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +import codecs +import os + +from setuptools import setup + + +def read(fname): + file_path = os.path.join(os.path.dirname(__file__), fname) + return codecs.open(file_path, encoding="utf-8").read() + + +# Add your dependencies in requirements.txt +# Note: you can add test-specific requirements in tox.ini +requirements = [] +with open("requirements.txt") as f: + for line in f: + stripped = line.split("#")[0].strip() + if len(stripped) > 0: + requirements.append(stripped) + + +setup( + name="napari-skimage-regionprops-mock", + author="Marcelo Zoccoler, Robert Haase", + author_email="robert.haase@tu-dresden.de", + license="BSD-3", + description='MOCK OF "A regionprops table widget plugin for napari"', + python_requires=">=3.8", + install_requires=requirements, + version="9.9.9", + setup_requires=["setuptools_scm"], +) diff --git a/tests/data/napari_workflows/wf_4_mock.yaml b/tests/data/napari_workflows/wf_4_mock.yaml new file mode 100644 index 000000000..2ef2fca05 --- /dev/null +++ b/tests/data/napari_workflows/wf_4_mock.yaml @@ -0,0 +1,12 @@ +!!python/object:napari_workflows._workflow.Workflow +_tasks: + regionprops_DAPI: !!python/tuple + - !!python/name:napari_skimage_regionprops_mock._regionprops.regionprops_table '' + - dapi_img + - dapi_label_img + - true + - false + - false + - false + - false + - false diff --git a/tests/tasks/test_workflows_napari_workflows.py b/tests/tasks/test_workflows_napari_workflows.py index 2a2fc2d70..c68708ef7 100644 --- a/tests/tasks/test_workflows_napari_workflows.py +++ b/tests/tasks/test_workflows_napari_workflows.py @@ -32,6 +32,14 @@ napari_workflows_wrapper, ) +try: + import napari_skimage_regionprops_mock + + has_napari_skimage_regionprops_mock = True + print(napari_skimage_regionprops_mock) +except ModuleNotFoundError: + has_napari_skimage_regionprops_mock = False + def test_napari_workflow( tmp_path: Path, @@ -365,35 +373,6 @@ def test_relabeling( ) debug(metadata) - # Re-run with overwrite=True - for component in metadata["image"]: - napari_workflows_wrapper( - input_paths=[str(zarr_path)], - output_path=str(zarr_path), - metadata=metadata, - component=component, - input_specs=input_specs, - output_specs=output_specs, - workflow_file=workflow_file, - input_ROI_table="FOV_ROI_table", - overwrite=True, - ) - - # Re-run with overwrite=False - with pytest.raises(OverwriteNotAllowedError): - for component in metadata["image"]: - napari_workflows_wrapper( - input_paths=[str(zarr_path)], - output_path=str(zarr_path), - metadata=metadata, - component=component, - input_specs=input_specs, - output_specs=output_specs, - workflow_file=workflow_file, - input_ROI_table="FOV_ROI_table", - overwrite=False, - ) - # Check output image_zarr = Path(zarr_path / metadata["image"][0]) validate_labels_and_measurements( @@ -781,3 +760,77 @@ def test_napari_workflow_CYX_wrong_dimensions( level=2, ) debug(e.value) + + +@pytest.mark.skipif( + not has_napari_skimage_regionprops_mock, + reason="napari_skimage_regionprops_mock not available", +) +def test_napari_workflow_mock( + tmp_path: Path, + testdata_path: Path, + zenodo_zarr: list[str], + zenodo_zarr_metadata: list[dict[str, Any]], +): + + # Init + zarr_path = tmp_path / "tmp_out/" + metadata = prepare_3D_zarr( + str(zarr_path), zenodo_zarr, zenodo_zarr_metadata + ) + debug(zarr_path) + debug(metadata) + + # Prepare parameters for first napari-workflows task (labeling) + workflow_file = str(testdata_path / "napari_workflows/wf_1.yaml") + input_specs: dict[str, NapariWorkflowsInput] = { + "input": {"type": "image", "channel": {"wavelength_id": "A01_C01"}}, # type: ignore # noqa + } + output_specs: dict[str, NapariWorkflowsOutput] = { + "Result of Expand labels (scikit-image, nsbatwm)": { # type: ignore # noqa + "type": "label", + "label_name": "label_DAPI", + }, + } + + # Run once + for component in metadata["image"]: + napari_workflows_wrapper( + input_paths=[str(zarr_path)], + output_path=str(zarr_path), + metadata=metadata, + component=component, + input_specs=input_specs, + output_specs=output_specs, + workflow_file=workflow_file, + input_ROI_table="FOV_ROI_table", + level=2, + ) + debug(metadata) + + # Prepare parameters for second napari-workflows task (measurement) + workflow_file = str(testdata_path / "napari_workflows/wf_4_mock.yaml") + input_specs = { + "dapi_img": {"type": "image", "channel": {"wavelength_id": "A01_C01"}}, # type: ignore # noqa + "dapi_label_img": {"type": "label", "label_name": "label_DAPI"}, # type: ignore # noqa + } + output_specs = { + "regionprops_DAPI": { # type: ignore # noqa + "type": "dataframe", + "table_name": "regionprops_DAPI", + }, + } + + # Run once + for component in metadata["image"]: + napari_workflows_wrapper( + input_paths=[str(zarr_path)], + output_path=str(zarr_path), + metadata=metadata, + component=component, + input_specs=input_specs, + output_specs=output_specs, + workflow_file=workflow_file, + input_ROI_table="FOV_ROI_table", + ) + debug(metadata)