interactive-pipe 0.8.9__tar.gz → 0.9.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- interactive_pipe-0.9.0/PKG-INFO +131 -0
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/pyproject.toml +31 -3
- interactive_pipe-0.9.0/readme.md +71 -0
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/src/interactive_pipe/__init__.py +29 -3
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/src/interactive_pipe/core/context.py +105 -127
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/src/interactive_pipe/core/engine.py +18 -6
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/src/interactive_pipe/core/filter.py +22 -33
- interactive_pipe-0.9.0/src/interactive_pipe/core/framework_state.py +84 -0
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/src/interactive_pipe/core/graph.py +45 -17
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/src/interactive_pipe/core/pipeline.py +30 -23
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/src/interactive_pipe/data_objects/audio.py +20 -17
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/src/interactive_pipe/data_objects/curves.py +7 -9
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/src/interactive_pipe/data_objects/data.py +23 -14
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/src/interactive_pipe/data_objects/image.py +57 -19
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/src/interactive_pipe/data_objects/table.py +10 -9
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/src/interactive_pipe/graphical/gradio_control.py +2 -1
- interactive_pipe-0.9.0/src/interactive_pipe/graphical/gradio_gui.py +381 -0
- interactive_pipe-0.9.0/src/interactive_pipe/graphical/gradio_layout.py +278 -0
- interactive_pipe-0.9.0/src/interactive_pipe/graphical/gradio_outputs.py +75 -0
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/src/interactive_pipe/graphical/gui.py +13 -21
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/src/interactive_pipe/graphical/mpl_control.py +1 -1
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/src/interactive_pipe/graphical/mpl_gui.py +6 -7
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/src/interactive_pipe/graphical/nb_control.py +2 -0
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/src/interactive_pipe/graphical/nb_gui.py +1 -1
- interactive_pipe-0.9.0/src/interactive_pipe/graphical/qt_audio.py +60 -0
- interactive_pipe-0.9.0/src/interactive_pipe/graphical/qt_backend.py +172 -0
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/src/interactive_pipe/graphical/qt_control.py +27 -7
- interactive_pipe-0.9.0/src/interactive_pipe/graphical/qt_gui.py +519 -0
- interactive_pipe-0.9.0/src/interactive_pipe/graphical/qt_image.py +107 -0
- interactive_pipe-0.9.0/src/interactive_pipe/graphical/qt_panels.py +191 -0
- interactive_pipe-0.9.0/src/interactive_pipe/graphical/qt_widgets.py +164 -0
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/src/interactive_pipe/graphical/window.py +3 -2
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/src/interactive_pipe/headless/control.py +88 -22
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/src/interactive_pipe/headless/keyboard.py +38 -8
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/src/interactive_pipe/headless/panel.py +6 -2
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/src/interactive_pipe/headless/pipeline.py +114 -52
- interactive_pipe-0.9.0/src/interactive_pipe/helper/_private.py +1 -0
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/src/interactive_pipe/helper/choose_backend.py +8 -5
- interactive_pipe-0.9.0/src/interactive_pipe/helper/control_abbreviation.py +167 -0
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/src/interactive_pipe/helper/filter_decorator.py +62 -29
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/src/interactive_pipe/helper/keyword_args_analyzer.py +26 -21
- interactive_pipe-0.9.0/src/interactive_pipe/helper/pipeline_decorator.py +113 -0
- interactive_pipe-0.9.0/src/interactive_pipe/py.typed +0 -0
- interactive_pipe-0.9.0/src/interactive_pipe.egg-info/PKG-INFO +131 -0
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/src/interactive_pipe.egg-info/SOURCES.txt +16 -2
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/src/interactive_pipe.egg-info/requires.txt +5 -0
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/test/test_context.py +76 -134
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/test/test_control_abbreviations.py +4 -4
- interactive_pipe-0.9.0/test/test_control_registry.py +170 -0
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/test/test_controller.py +12 -0
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/test/test_core.py +1 -1
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/test/test_core_exceptions.py +0 -4
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/test/test_data_objects_exceptions.py +84 -12
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/test/test_engine.py +18 -17
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/test/test_filter.py +12 -11
- interactive_pipe-0.9.0/test/test_framework_state.py +94 -0
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/test/test_headless.py +3 -3
- interactive_pipe-0.9.0/test/test_legacy_removal.py +79 -0
- interactive_pipe-0.9.0/test/test_qt_backend_cascade.py +102 -0
- interactive_pipe-0.9.0/test/test_smoke_gradio.py +211 -0
- interactive_pipe-0.9.0/test/test_smoke_mpl.py +59 -0
- interactive_pipe-0.9.0/test/test_smoke_qt.py +266 -0
- interactive_pipe-0.8.9/PKG-INFO +0 -577
- interactive_pipe-0.8.9/readme.md +0 -536
- interactive_pipe-0.8.9/src/interactive_pipe/graphical/gradio_gui.py +0 -651
- interactive_pipe-0.8.9/src/interactive_pipe/graphical/qt_gui.py +0 -981
- interactive_pipe-0.8.9/src/interactive_pipe/helper/_private.py +0 -2
- interactive_pipe-0.8.9/src/interactive_pipe/helper/control_abbreviation.py +0 -220
- interactive_pipe-0.8.9/src/interactive_pipe/helper/pipeline_decorator.py +0 -71
- interactive_pipe-0.8.9/src/interactive_pipe.egg-info/PKG-INFO +0 -577
- interactive_pipe-0.8.9/test/test_context_compatibility.py +0 -414
- interactive_pipe-0.8.9/test/test_legacy_warnings.py +0 -154
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/LICENSE +0 -0
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/setup.cfg +0 -0
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/src/interactive_pipe/core/__init__.py +0 -0
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/src/interactive_pipe/core/backend.py +0 -0
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/src/interactive_pipe/core/cache.py +0 -0
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/src/interactive_pipe/core/signature.py +0 -0
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/src/interactive_pipe/data_objects/__init__.py +0 -0
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/src/interactive_pipe/data_objects/parameters.py +0 -0
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/src/interactive_pipe/graphical/__init__.py +0 -0
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/src/interactive_pipe/graphical/mpl_window.py +0 -0
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/src/interactive_pipe/headless/__init__.py +0 -0
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/src/interactive_pipe/helper/__init__.py +0 -0
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/src/interactive_pipe.egg-info/dependency_links.txt +0 -0
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/src/interactive_pipe.egg-info/top_level.txt +0 -0
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/test/test_cache.py +0 -0
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/test/test_curves.py +0 -0
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/test/test_decorator.py +0 -0
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/test/test_edge_cases.py +0 -0
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/test/test_graphical_exceptions.py +0 -0
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/test/test_headless_exceptions.py +0 -0
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/test/test_image.py +0 -0
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/test/test_mutable_defaults.py +0 -0
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/test/test_parameters.py +0 -0
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/test/test_recorder.py +0 -0
- {interactive_pipe-0.8.9 → interactive_pipe-0.9.0}/test/test_table.py +0 -0
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: interactive_pipe
|
|
3
|
+
Version: 0.9.0
|
|
4
|
+
Summary: Library to create flexible interactive image processing pipelines and automatically add a graphical user interface without knowing anything about GUI coding!
|
|
5
|
+
Author-email: Balthazar Neveu <balthazarneveu@gmail.com>
|
|
6
|
+
Project-URL: Homepage, https://github.com/balthazarneveu/interactive_pipe
|
|
7
|
+
Project-URL: Documentation, https://balthazarneveu.github.io/interactive_pipe/
|
|
8
|
+
Project-URL: Source, https://github.com/balthazarneveu/interactive_pipe
|
|
9
|
+
Project-URL: Changelog, https://github.com/balthazarneveu/interactive_pipe/blob/master/CHANGELOG.md
|
|
10
|
+
Project-URL: Bug Tracker, https://github.com/balthazarneveu/interactive_pipe/issues
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Intended Audience :: Science/Research
|
|
14
|
+
Classifier: Intended Audience :: Education
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Topic :: Scientific/Engineering :: Image Processing
|
|
23
|
+
Classifier: Topic :: Scientific/Engineering :: Visualization
|
|
24
|
+
Classifier: Topic :: Software Development :: User Interfaces
|
|
25
|
+
Classifier: Typing :: Typed
|
|
26
|
+
Requires-Python: >=3.9
|
|
27
|
+
Description-Content-Type: text/markdown
|
|
28
|
+
License-File: LICENSE
|
|
29
|
+
Requires-Dist: matplotlib>=3.5.3
|
|
30
|
+
Requires-Dist: numpy>=1.21.6
|
|
31
|
+
Requires-Dist: Pillow>=9.0.1
|
|
32
|
+
Requires-Dist: PyYAML>=5.4.1
|
|
33
|
+
Provides-Extra: qt6
|
|
34
|
+
Requires-Dist: PyQt6>=6.5.2; extra == "qt6"
|
|
35
|
+
Requires-Dist: PyQt6_sip>=13.5.2; extra == "qt6"
|
|
36
|
+
Provides-Extra: qt5
|
|
37
|
+
Requires-Dist: PyQt5>=5.15.9; extra == "qt5"
|
|
38
|
+
Requires-Dist: PyQt5_sip>=12.12.1; extra == "qt5"
|
|
39
|
+
Provides-Extra: notebook
|
|
40
|
+
Requires-Dist: ipywidgets>=7.7.1; extra == "notebook"
|
|
41
|
+
Provides-Extra: pytest
|
|
42
|
+
Requires-Dist: opencv_python_headless>=4.8.1.78; extra == "pytest"
|
|
43
|
+
Requires-Dist: pytest>=6.2.5; extra == "pytest"
|
|
44
|
+
Provides-Extra: full
|
|
45
|
+
Requires-Dist: PyQt6>=6.5.2; extra == "full"
|
|
46
|
+
Requires-Dist: PyQt6_sip>=13.5.2; extra == "full"
|
|
47
|
+
Requires-Dist: opencv_python_headless>=4.8.1.78; extra == "full"
|
|
48
|
+
Requires-Dist: pytest>=6.2.5; extra == "full"
|
|
49
|
+
Requires-Dist: ipywidgets>=7.7.1; extra == "full"
|
|
50
|
+
Requires-Dist: pandas; extra == "full"
|
|
51
|
+
Requires-Dist: gradio; extra == "full"
|
|
52
|
+
Provides-Extra: dev
|
|
53
|
+
Requires-Dist: ruff>=0.9.0; extra == "dev"
|
|
54
|
+
Requires-Dist: pyright>=1.1.390; extra == "dev"
|
|
55
|
+
Provides-Extra: docs
|
|
56
|
+
Requires-Dist: mkdocs-material>=9.5; extra == "docs"
|
|
57
|
+
Requires-Dist: mkdocstrings[python]>=0.27; extra == "docs"
|
|
58
|
+
Requires-Dist: mkdocs-llmstxt>=0.2; extra == "docs"
|
|
59
|
+
Dynamic: license-file
|
|
60
|
+
|
|
61
|
+
<div align="center">
|
|
62
|
+
|
|
63
|
+

|
|
64
|
+
|
|
65
|
+
[](https://pypi.org/project/interactive-pipe/)
|
|
66
|
+
[](https://pypi.org/project/interactive-pipe/)
|
|
67
|
+
[](https://github.com/balthazarneveu/interactive_pipe/blob/master/LICENSE)
|
|
68
|
+
[](https://balthazarneveu.github.io/interactive_pipe/)
|
|
69
|
+
[](https://github.com/balthazarneveu/interactive_pipe/actions/workflows/pytest.yaml)
|
|
70
|
+
|
|
71
|
+
**📖 [Documentation](https://balthazarneveu.github.io/interactive_pipe/)**
|
|
72
|
+
|
|
73
|
+
</div>
|
|
74
|
+
|
|
75
|
+
# interactive_pipe
|
|
76
|
+
|
|
77
|
+
**Turn plain python processing functions into an interactive GUI app — without writing a single line of GUI code.**
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
pip install interactive-pipe
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
- Develop an algorithm while debugging visually with plots, checking robustness and continuity to parameter changes.
|
|
84
|
+
- Magically create a graphical interface to demonstrate a concept or tune your algorithm.
|
|
85
|
+
- Keep your algorithm library untouched: interactivity is added by decoration, not by rewriting.
|
|
86
|
+
- The same pipeline runs headless for batch processing and tests.
|
|
87
|
+
|
|
88
|
+

|
|
89
|
+
|
|
90
|
+
## Quick taste
|
|
91
|
+
|
|
92
|
+
```python
|
|
93
|
+
from interactive_pipe import interactive, interactive_pipeline
|
|
94
|
+
import numpy as np
|
|
95
|
+
|
|
96
|
+
@interactive(coeff=(1.0, [0.5, 2.0], "exposure"), bias=(0.0, [-0.2, 0.2]))
|
|
97
|
+
def exposure(img, coeff=1.0, bias=0.0):
|
|
98
|
+
return img * coeff + bias
|
|
99
|
+
|
|
100
|
+
@interactive(blend_coeff=(0.5, [0.0, 1.0]))
|
|
101
|
+
def blend(img0, img1, blend_coeff=0.5):
|
|
102
|
+
return (1 - blend_coeff) * img0 + blend_coeff * img1
|
|
103
|
+
|
|
104
|
+
@interactive_pipeline(gui="qt") # or "mpl", "nb" (Jupyter/Colab), "gradio"
|
|
105
|
+
def pipe(img):
|
|
106
|
+
exposed = exposure(img)
|
|
107
|
+
blended = blend(img, exposed)
|
|
108
|
+
return exposed, blended
|
|
109
|
+
|
|
110
|
+
pipe(np.array([0.0, 0.5, 0.8]) * np.ones((256, 512, 3)))
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Calling `pipe(...)` opens a window with sliders for every declared parameter. 🎉
|
|
114
|
+
|
|
115
|
+
## Backends
|
|
116
|
+
|
|
117
|
+
| *PyQt / PySide* | *Matplotlib* | *Jupyter / Colab* | *Gradio* |
|
|
118
|
+
|:-----:|:------:|:----:|:----:|
|
|
119
|
+
| `gui="qt"` | `gui="mpl"` | `gui="nb"` | `gui="gradio"` |
|
|
120
|
+
|  |  |  |  |
|
|
121
|
+
|
|
122
|
+
Plus headless mode (`gui=None`) for batch processing. Full feature matrix in the [backends docs](https://balthazarneveu.github.io/interactive_pipe/getting-started/backends/).
|
|
123
|
+
|
|
124
|
+
## Learn more
|
|
125
|
+
|
|
126
|
+
- 📖 [Documentation](https://balthazarneveu.github.io/interactive_pipe/) — quickstart, guides, API reference
|
|
127
|
+
- 🤖 Agent-friendly docs: [llms.txt](https://balthazarneveu.github.io/interactive_pipe/llms.txt) / [llms-full.txt](https://balthazarneveu.github.io/interactive_pipe/llms-full.txt)
|
|
128
|
+
- 🎓 [Interactive tutorial on Hugging Face](https://huggingface.co/spaces/balthou/interactive-pipe-tutorial)
|
|
129
|
+
- 🗒️ [Examples gallery](https://balthazarneveu.github.io/interactive_pipe/guide/examples/) — 17 demo scripts, Colab notebooks, a Raspberry Pi jukebox
|
|
130
|
+
- 📋 [Changelog](https://github.com/balthazarneveu/interactive_pipe/blob/master/CHANGELOG.md)
|
|
131
|
+
- 🤝 [Contributing](https://github.com/balthazarneveu/interactive_pipe/blob/master/CONTRIBUTING.md)
|
|
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
|
|
|
5
5
|
|
|
6
6
|
[project]
|
|
7
7
|
name = "interactive_pipe"
|
|
8
|
-
version = "0.
|
|
8
|
+
version = "0.9.0"
|
|
9
9
|
authors = [
|
|
10
10
|
{ name="Balthazar Neveu", email="balthazarneveu@gmail.com" },
|
|
11
11
|
]
|
|
@@ -18,15 +18,30 @@ dependencies = [
|
|
|
18
18
|
|
|
19
19
|
description = "Library to create flexible interactive image processing pipelines and automatically add a graphical user interface without knowing anything about GUI coding!"
|
|
20
20
|
readme = "readme.md"
|
|
21
|
-
requires-python = ">=3.
|
|
21
|
+
requires-python = ">=3.9"
|
|
22
22
|
classifiers = [
|
|
23
|
-
"
|
|
23
|
+
"Development Status :: 4 - Beta",
|
|
24
|
+
"Intended Audience :: Developers",
|
|
25
|
+
"Intended Audience :: Science/Research",
|
|
26
|
+
"Intended Audience :: Education",
|
|
24
27
|
"License :: OSI Approved :: MIT License",
|
|
25
28
|
"Operating System :: OS Independent",
|
|
29
|
+
"Programming Language :: Python :: 3",
|
|
30
|
+
"Programming Language :: Python :: 3.9",
|
|
31
|
+
"Programming Language :: Python :: 3.10",
|
|
32
|
+
"Programming Language :: Python :: 3.11",
|
|
33
|
+
"Programming Language :: Python :: 3.12",
|
|
34
|
+
"Topic :: Scientific/Engineering :: Image Processing",
|
|
35
|
+
"Topic :: Scientific/Engineering :: Visualization",
|
|
36
|
+
"Topic :: Software Development :: User Interfaces",
|
|
37
|
+
"Typing :: Typed",
|
|
26
38
|
]
|
|
27
39
|
|
|
28
40
|
[project.urls]
|
|
29
41
|
"Homepage" = "https://github.com/balthazarneveu/interactive_pipe"
|
|
42
|
+
"Documentation" = "https://balthazarneveu.github.io/interactive_pipe/"
|
|
43
|
+
"Source" = "https://github.com/balthazarneveu/interactive_pipe"
|
|
44
|
+
"Changelog" = "https://github.com/balthazarneveu/interactive_pipe/blob/master/CHANGELOG.md"
|
|
30
45
|
"Bug Tracker" = "https://github.com/balthazarneveu/interactive_pipe/issues"
|
|
31
46
|
|
|
32
47
|
[project.optional-dependencies]
|
|
@@ -64,6 +79,15 @@ dev=[
|
|
|
64
79
|
"pyright>=1.1.390",
|
|
65
80
|
]
|
|
66
81
|
|
|
82
|
+
docs=[
|
|
83
|
+
"mkdocs-material>=9.5",
|
|
84
|
+
"mkdocstrings[python]>=0.27",
|
|
85
|
+
"mkdocs-llmstxt>=0.2",
|
|
86
|
+
]
|
|
87
|
+
|
|
88
|
+
[tool.setuptools.package-data]
|
|
89
|
+
interactive_pipe = ["py.typed"]
|
|
90
|
+
|
|
67
91
|
[tool.ruff]
|
|
68
92
|
line-length = 120
|
|
69
93
|
target-version = "py39"
|
|
@@ -82,6 +106,10 @@ ignore = ["E203"] # E203: whitespace before ':' (conflicts with black formattin
|
|
|
82
106
|
[tool.pyright]
|
|
83
107
|
pythonVersion = "3.9"
|
|
84
108
|
typeCheckingMode = "basic"
|
|
109
|
+
# Resolve imports against the project venv (PyQt6, gradio, ...); without
|
|
110
|
+
# this pyright falls back to the system interpreter and cannot see Qt.
|
|
111
|
+
venvPath = "."
|
|
112
|
+
venv = "venv"
|
|
85
113
|
include = ["src"]
|
|
86
114
|
exclude = ["**/venv/**", "**/__pycache__/**", "test/**"]
|
|
87
115
|
reportMissingImports = "none" # Qt libs and other optional dependencies
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
[](https://pypi.org/project/interactive-pipe/)
|
|
6
|
+
[](https://pypi.org/project/interactive-pipe/)
|
|
7
|
+
[](https://github.com/balthazarneveu/interactive_pipe/blob/master/LICENSE)
|
|
8
|
+
[](https://balthazarneveu.github.io/interactive_pipe/)
|
|
9
|
+
[](https://github.com/balthazarneveu/interactive_pipe/actions/workflows/pytest.yaml)
|
|
10
|
+
|
|
11
|
+
**📖 [Documentation](https://balthazarneveu.github.io/interactive_pipe/)**
|
|
12
|
+
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
# interactive_pipe
|
|
16
|
+
|
|
17
|
+
**Turn plain python processing functions into an interactive GUI app — without writing a single line of GUI code.**
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
pip install interactive-pipe
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
- Develop an algorithm while debugging visually with plots, checking robustness and continuity to parameter changes.
|
|
24
|
+
- Magically create a graphical interface to demonstrate a concept or tune your algorithm.
|
|
25
|
+
- Keep your algorithm library untouched: interactivity is added by decoration, not by rewriting.
|
|
26
|
+
- The same pipeline runs headless for batch processing and tests.
|
|
27
|
+
|
|
28
|
+

|
|
29
|
+
|
|
30
|
+
## Quick taste
|
|
31
|
+
|
|
32
|
+
```python
|
|
33
|
+
from interactive_pipe import interactive, interactive_pipeline
|
|
34
|
+
import numpy as np
|
|
35
|
+
|
|
36
|
+
@interactive(coeff=(1.0, [0.5, 2.0], "exposure"), bias=(0.0, [-0.2, 0.2]))
|
|
37
|
+
def exposure(img, coeff=1.0, bias=0.0):
|
|
38
|
+
return img * coeff + bias
|
|
39
|
+
|
|
40
|
+
@interactive(blend_coeff=(0.5, [0.0, 1.0]))
|
|
41
|
+
def blend(img0, img1, blend_coeff=0.5):
|
|
42
|
+
return (1 - blend_coeff) * img0 + blend_coeff * img1
|
|
43
|
+
|
|
44
|
+
@interactive_pipeline(gui="qt") # or "mpl", "nb" (Jupyter/Colab), "gradio"
|
|
45
|
+
def pipe(img):
|
|
46
|
+
exposed = exposure(img)
|
|
47
|
+
blended = blend(img, exposed)
|
|
48
|
+
return exposed, blended
|
|
49
|
+
|
|
50
|
+
pipe(np.array([0.0, 0.5, 0.8]) * np.ones((256, 512, 3)))
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Calling `pipe(...)` opens a window with sliders for every declared parameter. 🎉
|
|
54
|
+
|
|
55
|
+
## Backends
|
|
56
|
+
|
|
57
|
+
| *PyQt / PySide* | *Matplotlib* | *Jupyter / Colab* | *Gradio* |
|
|
58
|
+
|:-----:|:------:|:----:|:----:|
|
|
59
|
+
| `gui="qt"` | `gui="mpl"` | `gui="nb"` | `gui="gradio"` |
|
|
60
|
+
|  |  |  |  |
|
|
61
|
+
|
|
62
|
+
Plus headless mode (`gui=None`) for batch processing. Full feature matrix in the [backends docs](https://balthazarneveu.github.io/interactive_pipe/getting-started/backends/).
|
|
63
|
+
|
|
64
|
+
## Learn more
|
|
65
|
+
|
|
66
|
+
- 📖 [Documentation](https://balthazarneveu.github.io/interactive_pipe/) — quickstart, guides, API reference
|
|
67
|
+
- 🤖 Agent-friendly docs: [llms.txt](https://balthazarneveu.github.io/interactive_pipe/llms.txt) / [llms-full.txt](https://balthazarneveu.github.io/interactive_pipe/llms-full.txt)
|
|
68
|
+
- 🎓 [Interactive tutorial on Hugging Face](https://huggingface.co/spaces/balthou/interactive-pipe-tutorial)
|
|
69
|
+
- 🗒️ [Examples gallery](https://balthazarneveu.github.io/interactive_pipe/guide/examples/) — 17 demo scripts, Colab notebooks, a Raspberry Pi jukebox
|
|
70
|
+
- 📋 [Changelog](https://github.com/balthazarneveu/interactive_pipe/blob/master/CHANGELOG.md)
|
|
71
|
+
- 🤝 [Contributing](https://github.com/balthazarneveu/interactive_pipe/blob/master/CONTRIBUTING.md)
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
__version__ = "0.
|
|
1
|
+
__version__ = "0.9.0"
|
|
2
2
|
# Backend enum for type-safe backend specification
|
|
3
3
|
from interactive_pipe.core.backend import Backend
|
|
4
4
|
|
|
5
5
|
# Clean context API - no more global_params pollution!
|
|
6
6
|
from interactive_pipe.core.context import (
|
|
7
|
-
SharedContext, # For legacy code migration with explicit injection - deprecated
|
|
8
7
|
audio,
|
|
9
8
|
context, # Direct dict-like access
|
|
9
|
+
events, # Key-bound context events (read-only)
|
|
10
10
|
get_context,
|
|
11
11
|
layout,
|
|
12
12
|
)
|
|
@@ -37,7 +37,33 @@ from interactive_pipe.helper.pipeline_decorator import interactive_pipeline
|
|
|
37
37
|
block = interactive
|
|
38
38
|
pipeline = interactive_pipeline
|
|
39
39
|
|
|
40
|
-
# You can
|
|
40
|
+
# You can use the following naming convention:
|
|
41
41
|
# import interactive_pipe as ip
|
|
42
42
|
# @ip.block(...)
|
|
43
43
|
# @ip.pipeline(...)
|
|
44
|
+
|
|
45
|
+
__all__ = [
|
|
46
|
+
"__version__",
|
|
47
|
+
"Backend",
|
|
48
|
+
"FilterError",
|
|
49
|
+
"context",
|
|
50
|
+
"layout",
|
|
51
|
+
"audio",
|
|
52
|
+
"events",
|
|
53
|
+
"get_context",
|
|
54
|
+
"Curve",
|
|
55
|
+
"SingleCurve",
|
|
56
|
+
"Image",
|
|
57
|
+
"Table",
|
|
58
|
+
"Control",
|
|
59
|
+
"CircularControl",
|
|
60
|
+
"TextPrompt",
|
|
61
|
+
"TimeControl",
|
|
62
|
+
"KeyboardControl",
|
|
63
|
+
"Panel",
|
|
64
|
+
"interact",
|
|
65
|
+
"interactive",
|
|
66
|
+
"interactive_pipeline",
|
|
67
|
+
"block",
|
|
68
|
+
"pipeline",
|
|
69
|
+
]
|