syd 0.1.0__tar.gz → 0.1.1__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.
- {syd-0.1.0 → syd-0.1.1}/PKG-INFO +1 -1
- {syd-0.1.0 → syd-0.1.1}/pyproject.toml +1 -1
- syd-0.1.1/syd/__init__.py +1 -0
- {syd-0.1.0 → syd-0.1.1}/syd/interactive_viewer.py +1 -1
- {syd-0.1.0 → syd-0.1.1}/syd/notebook_deploy.py +11 -4
- syd-0.1.0/syd/__init__.py +0 -1
- {syd-0.1.0 → syd-0.1.1}/.gitignore +0 -0
- {syd-0.1.0 → syd-0.1.1}/LICENSE +0 -0
- {syd-0.1.0 → syd-0.1.1}/README.md +0 -0
- {syd-0.1.0 → syd-0.1.1}/syd/parameters.py +0 -0
{syd-0.1.0 → syd-0.1.1}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: syd
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.1
|
|
4
4
|
Summary: A Python package for making GUIs for data science easy.
|
|
5
5
|
Project-URL: Homepage, https://github.com/landoskape/syd
|
|
6
6
|
Author-email: Andrew Landau <andrew+tyler+landau+getridofthisanddtheplusses@gmail.com>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.1.1"
|
|
@@ -62,7 +62,7 @@ def validate_parameter_operation(operation: str, parameter_type: ParameterType)
|
|
|
62
62
|
|
|
63
63
|
|
|
64
64
|
class InteractiveViewer:
|
|
65
|
-
def __new__(cls):
|
|
65
|
+
def __new__(cls, *args, **kwargs):
|
|
66
66
|
instance = super().__new__(cls)
|
|
67
67
|
instance.parameters = {}
|
|
68
68
|
instance.callbacks = {}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from typing import Dict, Any
|
|
1
|
+
from typing import Dict, Any, Tuple
|
|
2
2
|
import matplotlib.pyplot as plt
|
|
3
3
|
import ipywidgets as widgets
|
|
4
4
|
from IPython.display import display
|
|
@@ -22,7 +22,7 @@ class NotebookDeployment:
|
|
|
22
22
|
Includes enhanced layout control and figure size management.
|
|
23
23
|
"""
|
|
24
24
|
|
|
25
|
-
def __init__(self, viewer: InteractiveViewer):
|
|
25
|
+
def __init__(self, viewer: InteractiveViewer, figsize: Tuple[float, float] = (8, 6), controls_width: float = 30, continuous=False):
|
|
26
26
|
"""Initialize with an InteractiveViewer instance."""
|
|
27
27
|
self.viewer = viewer
|
|
28
28
|
self.widgets: Dict[str, widgets.Widget] = {}
|
|
@@ -30,8 +30,10 @@ class NotebookDeployment:
|
|
|
30
30
|
self._current_figure = None
|
|
31
31
|
|
|
32
32
|
# Default figure size
|
|
33
|
-
self.fig_width =
|
|
34
|
-
self.fig_height =
|
|
33
|
+
self.fig_width = figsize[0]
|
|
34
|
+
self.fig_height = figsize[1]
|
|
35
|
+
self.controls_width = controls_width
|
|
36
|
+
self.continuous = continuous
|
|
35
37
|
|
|
36
38
|
def _create_text_widget(self, param: TextParameter) -> widgets.Text:
|
|
37
39
|
"""Create a text input widget."""
|
|
@@ -72,6 +74,7 @@ class NotebookDeployment:
|
|
|
72
74
|
min=param.min_value,
|
|
73
75
|
max=param.max_value,
|
|
74
76
|
description=param.name,
|
|
77
|
+
continuous_update=self.continuous,
|
|
75
78
|
layout=widgets.Layout(width="95%"),
|
|
76
79
|
style={"description_width": "initial"},
|
|
77
80
|
)
|
|
@@ -85,6 +88,7 @@ class NotebookDeployment:
|
|
|
85
88
|
max=param.max_value,
|
|
86
89
|
step=param.step,
|
|
87
90
|
description=param.name,
|
|
91
|
+
continuous_update=self.continuous,
|
|
88
92
|
layout=widgets.Layout(width="95%"),
|
|
89
93
|
style={"description_width": "initial"},
|
|
90
94
|
)
|
|
@@ -149,6 +153,7 @@ class NotebookDeployment:
|
|
|
149
153
|
max=20,
|
|
150
154
|
step=0.5,
|
|
151
155
|
description="Figure Width",
|
|
156
|
+
continuous_update=True,
|
|
152
157
|
layout=widgets.Layout(width="95%"),
|
|
153
158
|
style={"description_width": "initial"},
|
|
154
159
|
)
|
|
@@ -159,6 +164,7 @@ class NotebookDeployment:
|
|
|
159
164
|
max=15,
|
|
160
165
|
step=0.5,
|
|
161
166
|
description="Figure Height",
|
|
167
|
+
continuous_update=True,
|
|
162
168
|
layout=widgets.Layout(width="95%"),
|
|
163
169
|
style={"description_width": "initial"},
|
|
164
170
|
)
|
|
@@ -168,6 +174,7 @@ class NotebookDeployment:
|
|
|
168
174
|
min=20,
|
|
169
175
|
max=80,
|
|
170
176
|
description="Controls Width %",
|
|
177
|
+
continuous_update=True,
|
|
171
178
|
layout=widgets.Layout(width="95%"),
|
|
172
179
|
style={"description_width": "initial"},
|
|
173
180
|
)
|
syd-0.1.0/syd/__init__.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.1.0"
|
|
File without changes
|
{syd-0.1.0 → syd-0.1.1}/LICENSE
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|