interactive-pipe 0.8.1__tar.gz → 0.8.2__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.8.1/src/interactive_pipe.egg-info → interactive_pipe-0.8.2}/PKG-INFO +2 -2
- {interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/pyproject.toml +1 -1
- {interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/readme.md +1 -1
- {interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/src/interactive_pipe/__init__.py +1 -1
- {interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/src/interactive_pipe/core/engine.py +1 -1
- {interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/src/interactive_pipe/core/pipeline.py +4 -0
- {interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/src/interactive_pipe/data_objects/audio.py +6 -0
- {interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/src/interactive_pipe/graphical/gradio_gui.py +14 -0
- {interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/src/interactive_pipe/graphical/qt_gui.py +5 -0
- {interactive_pipe-0.8.1 → interactive_pipe-0.8.2/src/interactive_pipe.egg-info}/PKG-INFO +2 -2
- {interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/LICENSE +0 -0
- {interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/setup.cfg +0 -0
- {interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/src/interactive_pipe/core/__init__.py +0 -0
- {interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/src/interactive_pipe/core/cache.py +0 -0
- {interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/src/interactive_pipe/core/filter.py +0 -0
- {interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/src/interactive_pipe/core/graph.py +0 -0
- {interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/src/interactive_pipe/core/signature.py +0 -0
- {interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/src/interactive_pipe/data_objects/__init__.py +0 -0
- {interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/src/interactive_pipe/data_objects/curves.py +0 -0
- {interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/src/interactive_pipe/data_objects/data.py +0 -0
- {interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/src/interactive_pipe/data_objects/image.py +0 -0
- {interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/src/interactive_pipe/data_objects/parameters.py +0 -0
- {interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/src/interactive_pipe/graphical/__init__.py +0 -0
- {interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/src/interactive_pipe/graphical/gradio_control.py +0 -0
- {interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/src/interactive_pipe/graphical/gui.py +0 -0
- {interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/src/interactive_pipe/graphical/mpl_control.py +0 -0
- {interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/src/interactive_pipe/graphical/mpl_gui.py +0 -0
- {interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/src/interactive_pipe/graphical/mpl_window.py +0 -0
- {interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/src/interactive_pipe/graphical/nb_control.py +0 -0
- {interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/src/interactive_pipe/graphical/nb_gui.py +0 -0
- {interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/src/interactive_pipe/graphical/qt_control.py +0 -0
- {interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/src/interactive_pipe/graphical/window.py +0 -0
- {interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/src/interactive_pipe/headless/__init__.py +0 -0
- {interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/src/interactive_pipe/headless/control.py +0 -0
- {interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/src/interactive_pipe/headless/keyboard.py +0 -0
- {interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/src/interactive_pipe/headless/pipeline.py +0 -0
- {interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/src/interactive_pipe/helper/__init__.py +0 -0
- {interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/src/interactive_pipe/helper/_private.py +0 -0
- {interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/src/interactive_pipe/helper/choose_backend.py +0 -0
- {interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/src/interactive_pipe/helper/control_abbreviation.py +0 -0
- {interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/src/interactive_pipe/helper/filter_decorator.py +0 -0
- {interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/src/interactive_pipe/helper/keyword_args_analyzer.py +0 -0
- {interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/src/interactive_pipe/helper/pipeline_decorator.py +0 -0
- {interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/src/interactive_pipe/thirdparty/images_openai_api.py +0 -0
- {interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/src/interactive_pipe/thirdparty/music_spotify.py +0 -0
- {interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/src/interactive_pipe.egg-info/SOURCES.txt +0 -0
- {interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/src/interactive_pipe.egg-info/dependency_links.txt +0 -0
- {interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/src/interactive_pipe.egg-info/requires.txt +0 -0
- {interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/src/interactive_pipe.egg-info/top_level.txt +0 -0
- {interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/test/test_cache.py +0 -0
- {interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/test/test_control_abbreviations.py +0 -0
- {interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/test/test_controller.py +0 -0
- {interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/test/test_core.py +0 -0
- {interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/test/test_curves.py +0 -0
- {interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/test/test_decorator.py +0 -0
- {interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/test/test_engine.py +0 -0
- {interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/test/test_filter.py +0 -0
- {interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/test/test_headless.py +0 -0
- {interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/test/test_image.py +0 -0
- {interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/test/test_parameters.py +0 -0
- {interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/test/test_recorder.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: interactive_pipe
|
|
3
|
-
Version: 0.8.
|
|
3
|
+
Version: 0.8.2
|
|
4
4
|
Summary: Library to create flexible interactive image processing pipelines and automatically add a graphical user interface without knowing anything about GUI coding!
|
|
5
5
|
Author-email: Balthazar Neveu <balthazarneveu@gmail.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/balthazarneveu/interactive_pipe
|
|
@@ -106,7 +106,7 @@ pip install -e ".[full]"
|
|
|
106
106
|
|
|
107
107
|
## :scroll: Features
|
|
108
108
|
|
|
109
|
-
**Version 0.8.
|
|
109
|
+
**Version 0.8.2**
|
|
110
110
|
- Modular multi-image processing filters
|
|
111
111
|
- Declarative: Easily make graphical user interface without having to learn anything about pyQt or matplotlib
|
|
112
112
|
- Support in jupyter notebooks
|
|
@@ -62,7 +62,7 @@ pip install -e ".[full]"
|
|
|
62
62
|
|
|
63
63
|
## :scroll: Features
|
|
64
64
|
|
|
65
|
-
**Version 0.8.
|
|
65
|
+
**Version 0.8.2**
|
|
66
66
|
- Modular multi-image processing filters
|
|
67
67
|
- Declarative: Easily make graphical user interface without having to learn anything about pyQt or matplotlib
|
|
68
68
|
- Support in jupyter notebooks
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
__version__ = "0.8.
|
|
1
|
+
__version__ = "0.8.2"
|
|
2
2
|
from interactive_pipe.helper.pipeline_decorator import pipeline, interactive_pipeline
|
|
3
3
|
from interactive_pipe.headless.control import Control, CircularControl
|
|
4
4
|
from interactive_pipe.data_objects.curves import Curve, SingleCurve
|
|
@@ -40,7 +40,7 @@ class PipelineEngine:
|
|
|
40
40
|
# if cache not available or if cache available and values have changed, need to recalculate from now on
|
|
41
41
|
# cache | has changed | skip_calculation
|
|
42
42
|
# 0 | X | False -> no cache, cannot skip so calculate
|
|
43
|
-
# 1 | 0 | True
|
|
43
|
+
# 1 | 0 | True -> cache with no change, skip the calculation
|
|
44
44
|
# 1 | 1 | False -> cache and result changed, cannot skip so calculate
|
|
45
45
|
skip_calculation &= (prc.cache_mem is not None) and (
|
|
46
46
|
not prc.cache_mem.has_changed(prc.values))
|
|
@@ -78,6 +78,10 @@ class PipelineCore:
|
|
|
78
78
|
"""
|
|
79
79
|
return self.engine.run(self.filters, imglst=self.inputs)
|
|
80
80
|
|
|
81
|
+
def _reset_global_params(self):
|
|
82
|
+
for filter in self.filters:
|
|
83
|
+
filter.global_params = self.global_params
|
|
84
|
+
|
|
81
85
|
@property
|
|
82
86
|
def parameters(self):
|
|
83
87
|
parameters = {}
|
{interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/src/interactive_pipe/data_objects/audio.py
RENAMED
|
@@ -13,6 +13,8 @@ try:
|
|
|
13
13
|
except ImportError:
|
|
14
14
|
logging.info("Cannot import wavio")
|
|
15
15
|
|
|
16
|
+
__iter_audio_player = 0
|
|
17
|
+
|
|
16
18
|
|
|
17
19
|
def audio_to_html(audio: Union[None, str, Path, Tuple[int, np.ndarray]], controls=True) -> str:
|
|
18
20
|
if audio is None:
|
|
@@ -33,6 +35,10 @@ def audio_to_html(audio: Union[None, str, Path, Tuple[int, np.ndarray]], control
|
|
|
33
35
|
if controls:
|
|
34
36
|
audio_player += ' controls'
|
|
35
37
|
audio_player += ' autoplay></audio>'
|
|
38
|
+
global __iter_audio_player
|
|
39
|
+
# to avoid reusing the same exact id and thus not updating the audio player
|
|
40
|
+
audio_player += "<p hidden>"+str(__iter_audio_player)+"</p>"
|
|
41
|
+
__iter_audio_player += 1
|
|
36
42
|
|
|
37
43
|
return audio_player
|
|
38
44
|
|
{interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/src/interactive_pipe/graphical/gradio_gui.py
RENAMED
|
@@ -8,6 +8,7 @@ from interactive_pipe.graphical.window import InteractivePipeWindow
|
|
|
8
8
|
from interactive_pipe.graphical.gui import InteractivePipeGUI
|
|
9
9
|
from interactive_pipe.headless.control import Control
|
|
10
10
|
from interactive_pipe.data_objects.audio import audio_to_html
|
|
11
|
+
from copy import copy
|
|
11
12
|
import logging
|
|
12
13
|
PYQTVERSION = None
|
|
13
14
|
MPL_SUPPORT = False
|
|
@@ -46,7 +47,18 @@ class InteractivePipeGradio(InteractivePipeGUI):
|
|
|
46
47
|
|
|
47
48
|
def run(self) -> list:
|
|
48
49
|
assert self.pipeline._PipelineCore__initialized_inputs, "Did you forget to initialize the pipeline inputs?"
|
|
50
|
+
# In gradio, the first run is a "dry run", used to get the output types...
|
|
51
|
+
try:
|
|
52
|
+
global_params_first_run = copy(self.pipeline.global_params)
|
|
53
|
+
# Do not use deepcopy, it will break the audio playback feature
|
|
54
|
+
except Exception as exc:
|
|
55
|
+
logging.warning(f"Cannot copy global_params: {exc}")
|
|
56
|
+
global_params_first_run = self.pipeline.global_params
|
|
57
|
+
pass
|
|
49
58
|
out_list = self.window.process_inputs_fn(*self.window.default_values)
|
|
59
|
+
self.pipeline.global_params = global_params_first_run
|
|
60
|
+
# Reset global parameters... in case they were modified by the first run
|
|
61
|
+
self.pipeline._reset_global_params()
|
|
50
62
|
self.window.refresh_display(out_list)
|
|
51
63
|
out_list_gradio_containers = []
|
|
52
64
|
for idx in range(len(out_list)):
|
|
@@ -247,6 +259,8 @@ class MainWindow(InteractivePipeWindow):
|
|
|
247
259
|
if isinstance(self.widget_list[idx], list):
|
|
248
260
|
changing_inputs.append(gr.State(self.ctrl[list(self.ctrl.keys())[idx]].value_default))
|
|
249
261
|
discard_reset_button = True # Do not show reset button if there are lists of buttons
|
|
262
|
+
self.ctrl[list(self.ctrl.keys())[idx]].filter_to_connect.cache = False
|
|
263
|
+
self.ctrl[list(self.ctrl.keys())[idx]].filter_to_connect.cache_mem = None
|
|
250
264
|
else:
|
|
251
265
|
changing_inputs.append(self.widget_list[idx])
|
|
252
266
|
if not discard_reset_button:
|
|
@@ -318,6 +318,11 @@ class MainWindow(QWidget, InteractivePipeWindow):
|
|
|
318
318
|
elif isinstance(ctrl, Control):
|
|
319
319
|
slider_instance = control_factory.create_control(
|
|
320
320
|
ctrl, self.update_parameter)
|
|
321
|
+
if ctrl._type == str and ctrl.icons is not None:
|
|
322
|
+
ctrl.filter_to_connect.cache = False
|
|
323
|
+
ctrl.filter_to_connect.cache_mem = None
|
|
324
|
+
# Disable cache for dropdown menu with icons!
|
|
325
|
+
# Allows clicking on the same item multiple times
|
|
321
326
|
slider_or_layout = slider_instance.create()
|
|
322
327
|
self.widget_list[slider_name] = slider_instance
|
|
323
328
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: interactive_pipe
|
|
3
|
-
Version: 0.8.
|
|
3
|
+
Version: 0.8.2
|
|
4
4
|
Summary: Library to create flexible interactive image processing pipelines and automatically add a graphical user interface without knowing anything about GUI coding!
|
|
5
5
|
Author-email: Balthazar Neveu <balthazarneveu@gmail.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/balthazarneveu/interactive_pipe
|
|
@@ -106,7 +106,7 @@ pip install -e ".[full]"
|
|
|
106
106
|
|
|
107
107
|
## :scroll: Features
|
|
108
108
|
|
|
109
|
-
**Version 0.8.
|
|
109
|
+
**Version 0.8.2**
|
|
110
110
|
- Modular multi-image processing filters
|
|
111
111
|
- Declarative: Easily make graphical user interface without having to learn anything about pyQt or matplotlib
|
|
112
112
|
- Support in jupyter notebooks
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/src/interactive_pipe/data_objects/__init__.py
RENAMED
|
File without changes
|
{interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/src/interactive_pipe/data_objects/curves.py
RENAMED
|
File without changes
|
|
File without changes
|
{interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/src/interactive_pipe/data_objects/image.py
RENAMED
|
File without changes
|
{interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/src/interactive_pipe/data_objects/parameters.py
RENAMED
|
File without changes
|
{interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/src/interactive_pipe/graphical/__init__.py
RENAMED
|
File without changes
|
{interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/src/interactive_pipe/graphical/gradio_control.py
RENAMED
|
File without changes
|
|
File without changes
|
{interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/src/interactive_pipe/graphical/mpl_control.py
RENAMED
|
File without changes
|
|
File without changes
|
{interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/src/interactive_pipe/graphical/mpl_window.py
RENAMED
|
File without changes
|
{interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/src/interactive_pipe/graphical/nb_control.py
RENAMED
|
File without changes
|
|
File without changes
|
{interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/src/interactive_pipe/graphical/qt_control.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/src/interactive_pipe/helper/choose_backend.py
RENAMED
|
File without changes
|
|
File without changes
|
{interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/src/interactive_pipe/helper/filter_decorator.py
RENAMED
|
File without changes
|
|
File without changes
|
{interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/src/interactive_pipe/helper/pipeline_decorator.py
RENAMED
|
File without changes
|
|
File without changes
|
{interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/src/interactive_pipe/thirdparty/music_spotify.py
RENAMED
|
File without changes
|
|
File without changes
|
{interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/src/interactive_pipe.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/src/interactive_pipe.egg-info/requires.txt
RENAMED
|
File without changes
|
{interactive_pipe-0.8.1 → interactive_pipe-0.8.2}/src/interactive_pipe.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|