synapse-sdk 1.0.0a98__py3-none-any.whl → 1.0.0b2__py3-none-any.whl
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.
Potentially problematic release.
This version of synapse-sdk might be problematic. Click here for more details.
- synapse_sdk/cli/__init__.py +139 -84
- synapse_sdk/cli/code_server.py +169 -0
- synapse_sdk/cli/config.py +105 -4
- synapse_sdk/cli/devtools.py +54 -34
- synapse_sdk/clients/base.py +3 -4
- synapse_sdk/devtools/server.py +24 -791
- synapse_sdk/devtools/streamlit_app/__init__.py +5 -0
- synapse_sdk/devtools/streamlit_app/app.py +128 -0
- synapse_sdk/devtools/streamlit_app/services/__init__.py +11 -0
- synapse_sdk/devtools/streamlit_app/services/job_service.py +233 -0
- synapse_sdk/devtools/streamlit_app/services/plugin_service.py +236 -0
- synapse_sdk/devtools/streamlit_app/services/serve_service.py +95 -0
- synapse_sdk/devtools/streamlit_app/ui/__init__.py +15 -0
- synapse_sdk/devtools/streamlit_app/ui/config_tab.py +76 -0
- synapse_sdk/devtools/streamlit_app/ui/deployment_tab.py +66 -0
- synapse_sdk/devtools/streamlit_app/ui/http_tab.py +125 -0
- synapse_sdk/devtools/streamlit_app/ui/jobs_tab.py +573 -0
- synapse_sdk/devtools/streamlit_app/ui/serve_tab.py +346 -0
- synapse_sdk/devtools/streamlit_app/ui/status_bar.py +118 -0
- synapse_sdk/devtools/streamlit_app/utils/__init__.py +40 -0
- synapse_sdk/devtools/streamlit_app/utils/json_viewer.py +197 -0
- synapse_sdk/devtools/streamlit_app/utils/log_formatter.py +38 -0
- synapse_sdk/devtools/streamlit_app/utils/styles.py +241 -0
- synapse_sdk/devtools/streamlit_app/utils/ui_components.py +289 -0
- synapse_sdk/devtools/streamlit_app.py +10 -0
- synapse_sdk/plugins/categories/upload/actions/upload.py +2 -1
- synapse_sdk/utils/converters/coco/from_dm.py +2 -2
- synapse_sdk/utils/converters/dm/__init__.py +0 -1
- {synapse_sdk-1.0.0a98.dist-info → synapse_sdk-1.0.0b2.dist-info}/METADATA +4 -6
- {synapse_sdk-1.0.0a98.dist-info → synapse_sdk-1.0.0b2.dist-info}/RECORD +34 -45
- synapse_sdk/devtools/models.py +0 -55
- synapse_sdk/devtools/utils.py +0 -52
- synapse_sdk/devtools/web/.gitignore +0 -2
- synapse_sdk/devtools/web/README.md +0 -34
- synapse_sdk/devtools/web/dist/index.html +0 -17
- synapse_sdk/devtools/web/index.html +0 -16
- synapse_sdk/devtools/web/jsconfig.json +0 -15
- synapse_sdk/devtools/web/package-lock.json +0 -2609
- synapse_sdk/devtools/web/package.json +0 -27
- synapse_sdk/devtools/web/pnpm-lock.yaml +0 -1055
- synapse_sdk/devtools/web/src/App.jsx +0 -14
- synapse_sdk/devtools/web/src/App.module.css +0 -33
- synapse_sdk/devtools/web/src/assets/favicon.ico +0 -0
- synapse_sdk/devtools/web/src/components/Breadcrumbs.jsx +0 -42
- synapse_sdk/devtools/web/src/components/Layout.jsx +0 -12
- synapse_sdk/devtools/web/src/components/LogViewer.jsx +0 -280
- synapse_sdk/devtools/web/src/components/MessageViewer.jsx +0 -150
- synapse_sdk/devtools/web/src/components/NavigationSidebar.jsx +0 -128
- synapse_sdk/devtools/web/src/components/ServerStatusBar.jsx +0 -245
- synapse_sdk/devtools/web/src/components/icons.jsx +0 -325
- synapse_sdk/devtools/web/src/index.css +0 -470
- synapse_sdk/devtools/web/src/index.jsx +0 -15
- synapse_sdk/devtools/web/src/logo.svg +0 -1
- synapse_sdk/devtools/web/src/router.jsx +0 -34
- synapse_sdk/devtools/web/src/utils/api.js +0 -442
- synapse_sdk/devtools/web/src/views/ApplicationDetailView.jsx +0 -241
- synapse_sdk/devtools/web/src/views/ApplicationsView.jsx +0 -224
- synapse_sdk/devtools/web/src/views/HomeView.jsx +0 -197
- synapse_sdk/devtools/web/src/views/JobDetailView.jsx +0 -310
- synapse_sdk/devtools/web/src/views/PluginView.jsx +0 -914
- synapse_sdk/devtools/web/vite.config.js +0 -13
- {synapse_sdk-1.0.0a98.dist-info → synapse_sdk-1.0.0b2.dist-info}/WHEEL +0 -0
- {synapse_sdk-1.0.0a98.dist-info → synapse_sdk-1.0.0b2.dist-info}/entry_points.txt +0 -0
- {synapse_sdk-1.0.0a98.dist-info → synapse_sdk-1.0.0b2.dist-info}/licenses/LICENSE +0 -0
- {synapse_sdk-1.0.0a98.dist-info → synapse_sdk-1.0.0b2.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
"""Unified UI components for consistent styling across the application."""
|
|
2
|
+
|
|
3
|
+
from typing import Any, Callable, Optional
|
|
4
|
+
|
|
5
|
+
import streamlit as st
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def render_action_button(
|
|
9
|
+
label: str,
|
|
10
|
+
key: str,
|
|
11
|
+
type: str = 'secondary',
|
|
12
|
+
icon: Optional[str] = None,
|
|
13
|
+
on_click: Optional[Callable] = None,
|
|
14
|
+
args: Optional[tuple] = None,
|
|
15
|
+
disabled: bool = False,
|
|
16
|
+
use_container_width: bool = False,
|
|
17
|
+
help: Optional[str] = None,
|
|
18
|
+
) -> bool:
|
|
19
|
+
"""Render a styled action button with consistent appearance."""
|
|
20
|
+
button_types = {
|
|
21
|
+
'primary': 'primary',
|
|
22
|
+
'secondary': 'secondary',
|
|
23
|
+
'danger': 'secondary', # Streamlit doesn't have danger, use CSS
|
|
24
|
+
'success': 'secondary',
|
|
25
|
+
'minimal': 'secondary',
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
# Add icon to label if provided
|
|
29
|
+
if icon:
|
|
30
|
+
display_label = f'{icon} {label}'
|
|
31
|
+
else:
|
|
32
|
+
display_label = label
|
|
33
|
+
|
|
34
|
+
# Create button with appropriate styling
|
|
35
|
+
clicked = st.button(
|
|
36
|
+
display_label,
|
|
37
|
+
key=key,
|
|
38
|
+
type=button_types.get(type, 'secondary'),
|
|
39
|
+
on_click=on_click,
|
|
40
|
+
args=args,
|
|
41
|
+
disabled=disabled,
|
|
42
|
+
use_container_width=use_container_width,
|
|
43
|
+
help=help,
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
# Apply custom CSS for special button types
|
|
47
|
+
if type == 'danger':
|
|
48
|
+
st.markdown(
|
|
49
|
+
f"""
|
|
50
|
+
<style>
|
|
51
|
+
button[kind="secondary"][key="{key}"] {{
|
|
52
|
+
background-color: #fff;
|
|
53
|
+
color: #dc3545;
|
|
54
|
+
border-color: #dc3545;
|
|
55
|
+
}}
|
|
56
|
+
button[kind="secondary"][key="{key}"]:hover {{
|
|
57
|
+
background-color: #dc3545;
|
|
58
|
+
color: white;
|
|
59
|
+
}}
|
|
60
|
+
</style>
|
|
61
|
+
""",
|
|
62
|
+
unsafe_allow_html=True,
|
|
63
|
+
)
|
|
64
|
+
elif type == 'success':
|
|
65
|
+
st.markdown(
|
|
66
|
+
f"""
|
|
67
|
+
<style>
|
|
68
|
+
button[kind="secondary"][key="{key}"] {{
|
|
69
|
+
background-color: #fff;
|
|
70
|
+
color: #28a745;
|
|
71
|
+
border-color: #28a745;
|
|
72
|
+
}}
|
|
73
|
+
button[kind="secondary"][key="{key}"]:hover {{
|
|
74
|
+
background-color: #28a745;
|
|
75
|
+
color: white;
|
|
76
|
+
}}
|
|
77
|
+
</style>
|
|
78
|
+
""",
|
|
79
|
+
unsafe_allow_html=True,
|
|
80
|
+
)
|
|
81
|
+
elif type == 'minimal':
|
|
82
|
+
st.markdown(
|
|
83
|
+
f"""
|
|
84
|
+
<style>
|
|
85
|
+
button[kind="secondary"][key="{key}"] {{
|
|
86
|
+
background-color: transparent;
|
|
87
|
+
border: none;
|
|
88
|
+
color: #007bff;
|
|
89
|
+
padding: 4px 8px;
|
|
90
|
+
}}
|
|
91
|
+
button[kind="secondary"][key="{key}"]:hover {{
|
|
92
|
+
background-color: #f8f9fa;
|
|
93
|
+
text-decoration: underline;
|
|
94
|
+
}}
|
|
95
|
+
</style>
|
|
96
|
+
""",
|
|
97
|
+
unsafe_allow_html=True,
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
return clicked
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
def render_section_header(title: str, subtitle: Optional[str] = None):
|
|
104
|
+
"""Render a consistent section header."""
|
|
105
|
+
subtitle_html = (
|
|
106
|
+
f'<p style="margin-top: 0.25rem; color: #6c757d; font-size: 14px;">{subtitle}</p>' if subtitle else ''
|
|
107
|
+
)
|
|
108
|
+
st.markdown(
|
|
109
|
+
f'<div style="margin-bottom: 1.5rem;">'
|
|
110
|
+
f'<h3 style="margin: 0; font-weight: 600; color: #1a1a1a;">{title}</h3>'
|
|
111
|
+
f'{subtitle_html}'
|
|
112
|
+
f'</div>',
|
|
113
|
+
unsafe_allow_html=True,
|
|
114
|
+
)
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
def render_info_card(title: str, content: str, type: str = 'info', icon: Optional[str] = None):
|
|
118
|
+
"""Render an information card with consistent styling."""
|
|
119
|
+
colors = {
|
|
120
|
+
'info': {'bg': '#d1ecf1', 'border': '#bee5eb', 'text': '#0c5460'},
|
|
121
|
+
'success': {'bg': '#d4edda', 'border': '#c3e6cb', 'text': '#155724'},
|
|
122
|
+
'warning': {'bg': '#fff3cd', 'border': '#ffeaa7', 'text': '#856404'},
|
|
123
|
+
'error': {'bg': '#f8d7da', 'border': '#f5c6cb', 'text': '#721c24'},
|
|
124
|
+
'neutral': {'bg': '#f8f9fa', 'border': '#dee2e6', 'text': '#495057'},
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
color_scheme = colors.get(type, colors['info'])
|
|
128
|
+
icon_html = f'<span style="margin-right: 8px;">{icon}</span>' if icon else ''
|
|
129
|
+
|
|
130
|
+
st.markdown(
|
|
131
|
+
f'<div style="'
|
|
132
|
+
f' background-color: {color_scheme["bg"]};'
|
|
133
|
+
f' border: 1px solid {color_scheme["border"]};'
|
|
134
|
+
f' border-radius: 6px;'
|
|
135
|
+
f' padding: 12px 16px;'
|
|
136
|
+
f' margin: 12px 0;'
|
|
137
|
+
f'">'
|
|
138
|
+
f'<div style="color: {color_scheme["text"]}; font-weight: 500; margin-bottom: 4px;">'
|
|
139
|
+
f'{icon_html}{title}'
|
|
140
|
+
f'</div>'
|
|
141
|
+
f'<div style="color: {color_scheme["text"]}; font-size: 14px;">{content}</div>'
|
|
142
|
+
f'</div>',
|
|
143
|
+
unsafe_allow_html=True,
|
|
144
|
+
)
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
def render_metric_card(label: str, value: Any, delta: Optional[str] = None, delta_color: str = 'normal'):
|
|
148
|
+
"""Render a metric card with consistent styling."""
|
|
149
|
+
delta_html = ''
|
|
150
|
+
if delta:
|
|
151
|
+
color = {'normal': '#28a745', 'inverse': '#dc3545', 'off': '#6c757d'}.get(delta_color, '#28a745')
|
|
152
|
+
delta_html = f'<div style="color: {color}; font-size: 12px; margin-top: 4px;">{delta}</div>'
|
|
153
|
+
|
|
154
|
+
st.markdown(
|
|
155
|
+
f'<div style="'
|
|
156
|
+
f' background-color: #fff;'
|
|
157
|
+
f' border: 1px solid #e0e0e0;'
|
|
158
|
+
f' border-radius: 8px;'
|
|
159
|
+
f' padding: 16px;'
|
|
160
|
+
f' margin: 8px 0;'
|
|
161
|
+
f'">'
|
|
162
|
+
f'<div style="color: #6c757d; font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px;">' # noqa: E501
|
|
163
|
+
f'{label}'
|
|
164
|
+
f'</div>'
|
|
165
|
+
f'<div style="color: #212529; font-size: 24px; font-weight: 600; margin-top: 4px;">'
|
|
166
|
+
f'{value}'
|
|
167
|
+
f'</div>'
|
|
168
|
+
f'{delta_html}'
|
|
169
|
+
f'</div>',
|
|
170
|
+
unsafe_allow_html=True,
|
|
171
|
+
)
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
def render_key_value_pair(key: str, value: Any, monospace_value: bool = False, inline: bool = True):
|
|
175
|
+
"""Render a key-value pair with consistent styling."""
|
|
176
|
+
value_style = 'font-family: monospace;' if monospace_value else ''
|
|
177
|
+
|
|
178
|
+
if inline:
|
|
179
|
+
st.markdown(
|
|
180
|
+
f'<div style="margin-bottom: 8px; font-size: 14px;">'
|
|
181
|
+
f'<span style="color: #495057; font-weight: 500;">{key}:</span> '
|
|
182
|
+
f'<span style="color: #212529; {value_style}">{value}</span>'
|
|
183
|
+
f'</div>',
|
|
184
|
+
unsafe_allow_html=True,
|
|
185
|
+
)
|
|
186
|
+
else:
|
|
187
|
+
st.markdown(
|
|
188
|
+
f'<div style="margin-bottom: 12px;">'
|
|
189
|
+
f'<div style="color: #495057; font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px;">' # noqa: E501
|
|
190
|
+
f'{key}'
|
|
191
|
+
f'</div>'
|
|
192
|
+
f'<div style="color: #212529; font-size: 14px; {value_style}">{value}</div>'
|
|
193
|
+
f'</div>',
|
|
194
|
+
unsafe_allow_html=True,
|
|
195
|
+
)
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
def render_divider(margin: str = '1.5rem'):
|
|
199
|
+
"""Render a consistent divider."""
|
|
200
|
+
st.markdown(
|
|
201
|
+
f'<hr style="margin: {margin} 0; border: none; border-top: 1px solid #e0e0e0;">', unsafe_allow_html=True
|
|
202
|
+
)
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
def render_table_header(columns: list, column_widths: list = None):
|
|
206
|
+
"""Render a consistent table header."""
|
|
207
|
+
if not column_widths:
|
|
208
|
+
column_widths = [1] * len(columns)
|
|
209
|
+
|
|
210
|
+
header_cols = st.columns(column_widths)
|
|
211
|
+
for i, header in enumerate(columns):
|
|
212
|
+
with header_cols[i]:
|
|
213
|
+
st.markdown(
|
|
214
|
+
f'<div style="'
|
|
215
|
+
f' color: #495057;'
|
|
216
|
+
f' font-size: 12px;'
|
|
217
|
+
f' font-weight: 600;'
|
|
218
|
+
f' text-transform: uppercase;'
|
|
219
|
+
f' letter-spacing: 0.5px;'
|
|
220
|
+
f' padding: 8px 0;'
|
|
221
|
+
f' border-bottom: 2px solid #dee2e6;'
|
|
222
|
+
f'">{header}</div>',
|
|
223
|
+
unsafe_allow_html=True,
|
|
224
|
+
)
|
|
225
|
+
return header_cols
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
def render_empty_state(
|
|
229
|
+
message: str,
|
|
230
|
+
icon: Optional[str] = None,
|
|
231
|
+
action_label: Optional[str] = None,
|
|
232
|
+
action_callback: Optional[Callable] = None,
|
|
233
|
+
):
|
|
234
|
+
"""Render an empty state message with optional action."""
|
|
235
|
+
icon_html = f'<div style="font-size: 48px; margin-bottom: 16px;">{icon}</div>' if icon else ''
|
|
236
|
+
|
|
237
|
+
st.markdown(
|
|
238
|
+
f'<div style="'
|
|
239
|
+
f' text-align: center;'
|
|
240
|
+
f' padding: 48px 24px;'
|
|
241
|
+
f' background-color: #f8f9fa;'
|
|
242
|
+
f' border-radius: 8px;'
|
|
243
|
+
f' margin: 24px 0;'
|
|
244
|
+
f'">'
|
|
245
|
+
f'{icon_html}'
|
|
246
|
+
f'<div style="color: #6c757d; font-size: 16px;">{message}</div>'
|
|
247
|
+
f'</div>',
|
|
248
|
+
unsafe_allow_html=True,
|
|
249
|
+
)
|
|
250
|
+
|
|
251
|
+
if action_label and action_callback:
|
|
252
|
+
col1, col2, col3 = st.columns([1, 1, 1])
|
|
253
|
+
with col2:
|
|
254
|
+
if st.button(action_label, key='empty_state_action', type='primary'):
|
|
255
|
+
action_callback()
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
def render_progress_bar(progress: float, label: Optional[str] = None, show_percentage: bool = True):
|
|
259
|
+
"""Render a custom progress bar with consistent styling."""
|
|
260
|
+
percentage = int(progress * 100)
|
|
261
|
+
|
|
262
|
+
label_html = f'<div style="font-size: 12px; color: #6c757d; margin-bottom: 4px;">{label}</div>' if label else ''
|
|
263
|
+
percentage_html = (
|
|
264
|
+
f'<span style="font-size: 12px; color: #495057; margin-left: 8px;">{percentage}%</span>'
|
|
265
|
+
if show_percentage
|
|
266
|
+
else ''
|
|
267
|
+
)
|
|
268
|
+
|
|
269
|
+
st.markdown(
|
|
270
|
+
f'{label_html}'
|
|
271
|
+
f'<div style="display: flex; align-items: center;">'
|
|
272
|
+
f'<div style="'
|
|
273
|
+
f' flex: 1;'
|
|
274
|
+
f' height: 8px;'
|
|
275
|
+
f' background-color: #e9ecef;'
|
|
276
|
+
f' border-radius: 4px;'
|
|
277
|
+
f' overflow: hidden;'
|
|
278
|
+
f'">'
|
|
279
|
+
f'<div style="'
|
|
280
|
+
f' width: {percentage}%;'
|
|
281
|
+
f' height: 100%;'
|
|
282
|
+
f' background: linear-gradient(90deg, #007bff 0%, #0056b3 100%);'
|
|
283
|
+
f' transition: width 0.3s ease;'
|
|
284
|
+
f'"></div>'
|
|
285
|
+
f'</div>'
|
|
286
|
+
f'{percentage_html}'
|
|
287
|
+
f'</div>',
|
|
288
|
+
unsafe_allow_html=True,
|
|
289
|
+
)
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"""Streamlit-based Synapse DevTools Application.
|
|
2
|
+
|
|
3
|
+
This module imports from the modularized structure.
|
|
4
|
+
The main application logic is now in streamlit_app/app.py
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from synapse_sdk.devtools.streamlit_app import main
|
|
8
|
+
|
|
9
|
+
if __name__ == '__main__':
|
|
10
|
+
main()
|
|
@@ -207,7 +207,8 @@ class UploadParams(BaseModel):
|
|
|
207
207
|
storage (int): The storage of the action.
|
|
208
208
|
collection (int): The collection of the action.
|
|
209
209
|
project (int | None): The project of the action.
|
|
210
|
-
excel_metadata_path (str | None): Path to excel file containing metadata.
|
|
210
|
+
excel_metadata_path (str | None): Path to excel file containing metadata.
|
|
211
|
+
Defaults to 'meta.xlsx' or 'meta.xls' in the path directory.
|
|
211
212
|
"""
|
|
212
213
|
|
|
213
214
|
name: Annotated[str, AfterValidator(non_blank)]
|
|
@@ -277,7 +277,7 @@ class FromDMToCOCOConverter(FromDMConverter):
|
|
|
277
277
|
else:
|
|
278
278
|
print(f'[WARNING] Image not found: {src_path}')
|
|
279
279
|
|
|
280
|
-
def convert_single_file(self, data: Dict[str, Any], original_file: IO) -> Dict[str, Any]:
|
|
280
|
+
def convert_single_file(self, data: Dict[str, Any], original_file: IO, file_name: str) -> Dict[str, Any]:
|
|
281
281
|
"""Convert a single DM data dict and corresponding image file object to COCO format.
|
|
282
282
|
|
|
283
283
|
Args:
|
|
@@ -305,7 +305,7 @@ class FromDMToCOCOConverter(FromDMConverter):
|
|
|
305
305
|
|
|
306
306
|
image_info = {
|
|
307
307
|
'id': self.img_id,
|
|
308
|
-
'file_name':
|
|
308
|
+
'file_name': file_name,
|
|
309
309
|
'width': width,
|
|
310
310
|
'height': height,
|
|
311
311
|
'license': self.license_id,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: synapse-sdk
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.0b2
|
|
4
4
|
Summary: synapse sdk
|
|
5
5
|
Author-email: datamaker <developer@datamaker.io>
|
|
6
6
|
License: MIT
|
|
@@ -27,11 +27,9 @@ Requires-Dist: ray[all]==2.44.1; extra == "all"
|
|
|
27
27
|
Requires-Dist: python-nmap; extra == "all"
|
|
28
28
|
Requires-Dist: hyperopt; extra == "all"
|
|
29
29
|
Requires-Dist: bayesian-optimization==1.4.3; extra == "all"
|
|
30
|
-
Provides-Extra:
|
|
31
|
-
Requires-Dist:
|
|
32
|
-
Requires-Dist:
|
|
33
|
-
Requires-Dist: websockets>=15.0.1; extra == "dashboard"
|
|
34
|
-
Requires-Dist: aiofiles>=24.1.0; extra == "dashboard"
|
|
30
|
+
Provides-Extra: devtools
|
|
31
|
+
Requires-Dist: streamlit>=1.29.0; extra == "devtools"
|
|
32
|
+
Requires-Dist: streamlit-ace>=0.1.1; extra == "devtools"
|
|
35
33
|
Provides-Extra: test
|
|
36
34
|
Requires-Dist: pytest>=7.0.0; extra == "test"
|
|
37
35
|
Requires-Dist: pytest-cov>=4.0.0; extra == "test"
|
|
@@ -6,9 +6,10 @@ synapse_sdk/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
6
6
|
synapse_sdk/i18n.py,sha256=VXMR-Zm_1hTAg9iPk3YZNNq-T1Bhx1J2fEtRT6kyYbg,766
|
|
7
7
|
synapse_sdk/loggers.py,sha256=xK48h3ZaDDZLaF-qsdnv1-6-4vw_cYlgpSCKHYUQw1g,6549
|
|
8
8
|
synapse_sdk/types.py,sha256=khzn8KpgxFdn1SrpbcuX84m_Md1Mz_HIoUoPq8uok40,698
|
|
9
|
-
synapse_sdk/cli/__init__.py,sha256=
|
|
10
|
-
synapse_sdk/cli/
|
|
11
|
-
synapse_sdk/cli/
|
|
9
|
+
synapse_sdk/cli/__init__.py,sha256=tdOwJRf6qggHqFrXBTwvhUbkG0KZmJ_xDlDdDv7Wn8M,11663
|
|
10
|
+
synapse_sdk/cli/code_server.py,sha256=vp5i0p8BO-bA3XrbqBtb95S0kGhQZwzmPJj42YTX72s,7042
|
|
11
|
+
synapse_sdk/cli/config.py,sha256=2WVKeAdcDeiwRb4JnNEOeZoAVlTHrY2jx4NAUiAZO2c,16156
|
|
12
|
+
synapse_sdk/cli/devtools.py,sha256=hi06utdLllptlUy3HhPfmfRqjc9bdiVGezY0U5s_0pY,2617
|
|
12
13
|
synapse_sdk/cli/alias/__init__.py,sha256=jDy8N_KupVy7n_jKKWhjQOj76-mR-uoVvMoyzObUkuI,405
|
|
13
14
|
synapse_sdk/cli/alias/create.py,sha256=P9uX_dbafSdpO4UM4A4l6fyu88I3plaUPnIk72z5-wQ,1132
|
|
14
15
|
synapse_sdk/cli/alias/dataclass.py,sha256=avVaUvBmtdVkM9GD_MilCXk0kVQSbh2p5s5XEqL4kMs,1498
|
|
@@ -23,7 +24,7 @@ synapse_sdk/cli/plugin/create.py,sha256=HpYTpohV1NbSrULaVUlc4jWLWznPrx7glgydTM3s
|
|
|
23
24
|
synapse_sdk/cli/plugin/publish.py,sha256=wok85WnfXzb4j6Aix7gRWM3kXW3E2eC31Q3bsDrn-vw,1547
|
|
24
25
|
synapse_sdk/cli/plugin/run.py,sha256=xz5LRm3zh8Y9DMjw5FFRFVRWSCWtYfZJskfCmrPikaQ,2598
|
|
25
26
|
synapse_sdk/clients/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
26
|
-
synapse_sdk/clients/base.py,sha256=
|
|
27
|
+
synapse_sdk/clients/base.py,sha256=2-aCbWx0LcFGXXgd9nkWtaaSroRJybjRAHAT4qCjhv0,12889
|
|
27
28
|
synapse_sdk/clients/exceptions.py,sha256=ylv7x10eOp4aA3a48jwonnvqvkiYwzJYXjkVkRTAjwk,220
|
|
28
29
|
synapse_sdk/clients/utils.py,sha256=8pPJTdzHiRPSbZMoQYHAgR2BAMO6u_R_jMV6a2p34iQ,392
|
|
29
30
|
synapse_sdk/clients/agent/__init__.py,sha256=FqYbtzMJdzRfuU2SA-Yxdc0JKmVP1wxH6OlUNmB4lH8,2230
|
|
@@ -45,9 +46,8 @@ synapse_sdk/clients/validators/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5
|
|
|
45
46
|
synapse_sdk/clients/validators/collections.py,sha256=LtnwvutsScubOUcZ2reGHLCzseXxtNIdnH2nv098aUU,1195
|
|
46
47
|
synapse_sdk/devtools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
47
48
|
synapse_sdk/devtools/config.py,sha256=ODAfnXD4TBZQM2dxL7pcHlx6JfkZo15Kwf1MEenbics,2509
|
|
48
|
-
synapse_sdk/devtools/
|
|
49
|
-
synapse_sdk/devtools/
|
|
50
|
-
synapse_sdk/devtools/utils.py,sha256=-f3ZxnRpYg6suNQIL-m4n1DhvLdQEbS4e9Mk9tQ8crE,1706
|
|
49
|
+
synapse_sdk/devtools/server.py,sha256=tj-9ICg1bSECvDD1yUZnLeiH7qpUcwrJ6jaD9C1Ba_8,1454
|
|
50
|
+
synapse_sdk/devtools/streamlit_app.py,sha256=fa17_8NUDCClWp8ESLkPEUD5CTo6bisTFEVXniyUhY8,256
|
|
51
51
|
synapse_sdk/devtools/docs/.gitignore,sha256=fCv2uiY7oUmiiFhHqfcYbg169Y-q4-AfLmmnRl98_sw,233
|
|
52
52
|
synapse_sdk/devtools/docs/README.md,sha256=yBzWf0K1ef4oymFXDaHo0nYWEgMQJqsOyrkNhIOPQrY,774
|
|
53
53
|
synapse_sdk/devtools/docs/docusaurus.config.ts,sha256=zH1dxP4hmKsYWTo1OYMBIeE0Cj5dC8KChVtkORNQB5E,3129
|
|
@@ -76,35 +76,24 @@ synapse_sdk/devtools/docs/static/img/logo.png,sha256=JQWNUU1U4D7Rsta3EJAe9jK-BgF
|
|
|
76
76
|
synapse_sdk/devtools/docs/static/img/undraw_docusaurus_mountain.svg,sha256=XWOoH_PdXqJm6ZFW-OM_dswC3w8E4aRIckBmNwRmC38,31486
|
|
77
77
|
synapse_sdk/devtools/docs/static/img/undraw_docusaurus_react.svg,sha256=Hywde83UIZyYadlLRcBS4oVkZOkcPgcE2ZtHFNMsxmg,36002
|
|
78
78
|
synapse_sdk/devtools/docs/static/img/undraw_docusaurus_tree.svg,sha256=CXBNiO-Elke_LuAqTLGxtBPwAN4Fmo15QBkjjvLF5Kc,11887
|
|
79
|
-
synapse_sdk/devtools/
|
|
80
|
-
synapse_sdk/devtools/
|
|
81
|
-
synapse_sdk/devtools/
|
|
82
|
-
synapse_sdk/devtools/
|
|
83
|
-
synapse_sdk/devtools/
|
|
84
|
-
synapse_sdk/devtools/
|
|
85
|
-
synapse_sdk/devtools/
|
|
86
|
-
synapse_sdk/devtools/
|
|
87
|
-
synapse_sdk/devtools/
|
|
88
|
-
synapse_sdk/devtools/
|
|
89
|
-
synapse_sdk/devtools/
|
|
90
|
-
synapse_sdk/devtools/
|
|
91
|
-
synapse_sdk/devtools/
|
|
92
|
-
synapse_sdk/devtools/
|
|
93
|
-
synapse_sdk/devtools/
|
|
94
|
-
synapse_sdk/devtools/
|
|
95
|
-
synapse_sdk/devtools/
|
|
96
|
-
synapse_sdk/devtools/
|
|
97
|
-
synapse_sdk/devtools/web/src/components/LogViewer.jsx,sha256=3rdszzAocjxSyiyyBaOS9WYdepO76-Xo0fqnYJ7YmwY,8840
|
|
98
|
-
synapse_sdk/devtools/web/src/components/MessageViewer.jsx,sha256=maCiK1D3P-Y5UJaaq_rIfU481GTmB9pFiPygMk2EK3I,5029
|
|
99
|
-
synapse_sdk/devtools/web/src/components/NavigationSidebar.jsx,sha256=IW2PiUOiJuLW1HrBoFjAfFdKYKK8eodimdgL3Za7dmk,3993
|
|
100
|
-
synapse_sdk/devtools/web/src/components/ServerStatusBar.jsx,sha256=vBH36S9Wcjy-3rTw9gtJE-Q-R_6IJ8qDpDDeRNlMW6I,8234
|
|
101
|
-
synapse_sdk/devtools/web/src/components/icons.jsx,sha256=PWLGyluP0sudc0Qlc7jcbCcEMXocaX_oFULvRVMepKc,7690
|
|
102
|
-
synapse_sdk/devtools/web/src/utils/api.js,sha256=dPVeAnYpQGVE83xcPILL1p7cW9gOYADACPMl-xYe9M4,10861
|
|
103
|
-
synapse_sdk/devtools/web/src/views/ApplicationDetailView.jsx,sha256=wMXIkRkiykWZZrMGZ8bymmzpoN6miHN7RUqL5eLt9P4,9640
|
|
104
|
-
synapse_sdk/devtools/web/src/views/ApplicationsView.jsx,sha256=LKfIWGf7isXc6_Fxaxei_8gM5bbQ_zWkGrfw8Qe5vpI,9081
|
|
105
|
-
synapse_sdk/devtools/web/src/views/HomeView.jsx,sha256=ri2Rq_RzEzfYqNRKna1cI2pWHcvGoWRSS1oZXxGDAGc,8038
|
|
106
|
-
synapse_sdk/devtools/web/src/views/JobDetailView.jsx,sha256=QyVgFMdzHgTQKA7IiEjDtMHjRAAo3ERpe7QBQsWgb7M,11830
|
|
107
|
-
synapse_sdk/devtools/web/src/views/PluginView.jsx,sha256=_-V8elSiEtsvKECeROtQopSY8f5JUIypZhY-vD3XorE,39357
|
|
79
|
+
synapse_sdk/devtools/streamlit_app/__init__.py,sha256=7oO_5ppKNH3QI_HLkryaVpsNb_AIQkx0TqFr_RrFYNY,123
|
|
80
|
+
synapse_sdk/devtools/streamlit_app/app.py,sha256=-R0f1y9lLL3mdFKkQJigXzdDoYTK0U7EedJduJz8d4k,4281
|
|
81
|
+
synapse_sdk/devtools/streamlit_app/services/__init__.py,sha256=z5ki6N2cPzxK2XT8zhwGFi8RBkAeD1hNlPa9i6uqArk,228
|
|
82
|
+
synapse_sdk/devtools/streamlit_app/services/job_service.py,sha256=h2KGq2kaOE5na-2zQBGZOwp4su6abtqzx9ma_Bz0to8,11036
|
|
83
|
+
synapse_sdk/devtools/streamlit_app/services/plugin_service.py,sha256=MNTMvzoy4zo3qCrTb5QMghWmzvGgWMEGt1-qXdbxk24,8589
|
|
84
|
+
synapse_sdk/devtools/streamlit_app/services/serve_service.py,sha256=LynDK7X1bFfcfJoYfomiNNcmu5rowbWhsuTcOZLTeVM,4643
|
|
85
|
+
synapse_sdk/devtools/streamlit_app/ui/__init__.py,sha256=YtjnoUTjSrlq_sfzCCesvbpYf_fELvSMBG-Qp-z9zJk,311
|
|
86
|
+
synapse_sdk/devtools/streamlit_app/ui/config_tab.py,sha256=3R-IR6KROdqs-zSSaR067q7BmZ7FHIJcbGtt3kHT7Yw,3358
|
|
87
|
+
synapse_sdk/devtools/streamlit_app/ui/deployment_tab.py,sha256=qTIHTiD9Kxaf7Fzerd3PNCO6ffofAz7fmhXe5H-IXls,2415
|
|
88
|
+
synapse_sdk/devtools/streamlit_app/ui/http_tab.py,sha256=sNbceVIqtrZ4bkTvigwkGEFCdJ4gJ3ChLxafjq2sNpI,4516
|
|
89
|
+
synapse_sdk/devtools/streamlit_app/ui/jobs_tab.py,sha256=nhmFrYDMocyAxJlEtC6SuDKPUserkZF0UFwdhFGm4Ko,22369
|
|
90
|
+
synapse_sdk/devtools/streamlit_app/ui/serve_tab.py,sha256=aF4QF3EIztZO9xDwj-9oy1QKm6qO0FvVw6BHHHvsXaE,14723
|
|
91
|
+
synapse_sdk/devtools/streamlit_app/ui/status_bar.py,sha256=wnsgKuMiTSgPbaDxJ4E4hWgI8Y9mldoCUNs9plI0H54,4619
|
|
92
|
+
synapse_sdk/devtools/streamlit_app/utils/__init__.py,sha256=o5S4h5p1s3EnMWxX_5D-NZUK94JVRNWa-bxodKr4b0s,944
|
|
93
|
+
synapse_sdk/devtools/streamlit_app/utils/json_viewer.py,sha256=W1OH27fq3dazrENBCzQP2_3zMYSdDtS7-V5s1sn6slc,7211
|
|
94
|
+
synapse_sdk/devtools/streamlit_app/utils/log_formatter.py,sha256=fQZoEGP-FK9Sgoqh0Z-o1zX_MHpiXVZXLu_4WMcvYNQ,1292
|
|
95
|
+
synapse_sdk/devtools/streamlit_app/utils/styles.py,sha256=ivVBlHzJll9uVZX25Sdbu5Hq40SOmaRamrCqY9A9aFY,5147
|
|
96
|
+
synapse_sdk/devtools/streamlit_app/utils/ui_components.py,sha256=ciSyNEhPYNU6KqnfgDI9RZr1tGFZeiOJ9qBDhlXqmUY,9557
|
|
108
97
|
synapse_sdk/plugins/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
109
98
|
synapse_sdk/plugins/enums.py,sha256=ibixwqA3sCNSriG1jAtL54JQc_Zwo3MufwYUqGhVncc,523
|
|
110
99
|
synapse_sdk/plugins/exceptions.py,sha256=Qs7qODp_RRLO9y2otU2T4ryj5LFwIZODvSIXkAh91u0,691
|
|
@@ -165,7 +154,7 @@ synapse_sdk/plugins/categories/smart_tool/templates/plugin/__init__.py,sha256=47
|
|
|
165
154
|
synapse_sdk/plugins/categories/smart_tool/templates/plugin/auto_label.py,sha256=eevNg0nOcYFR4z_L_R-sCvVOYoLWSAH1jwDkAf3YCjY,320
|
|
166
155
|
synapse_sdk/plugins/categories/upload/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
167
156
|
synapse_sdk/plugins/categories/upload/actions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
168
|
-
synapse_sdk/plugins/categories/upload/actions/upload.py,sha256=
|
|
157
|
+
synapse_sdk/plugins/categories/upload/actions/upload.py,sha256=7oV8kcJ_JTkHtRHHf0e1s3dka_CKf2engMkIioLTdek,38291
|
|
169
158
|
synapse_sdk/plugins/categories/upload/templates/config.yaml,sha256=6_dRa0_J2aS8NSUfO4MKbPxZcdPS2FpJzzp51edYAZc,281
|
|
170
159
|
synapse_sdk/plugins/categories/upload/templates/plugin/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
171
160
|
synapse_sdk/plugins/categories/upload/templates/plugin/upload.py,sha256=IZU4sdSMSLKPCtlNqF7DP2howTdYR6hr74HCUZsGdPk,1559
|
|
@@ -198,9 +187,9 @@ synapse_sdk/utils/network.py,sha256=WI8qn6KlKpHdMi45V57ofKJB8zusJrbQsxT74LwVfsY,
|
|
|
198
187
|
synapse_sdk/utils/string.py,sha256=rEwuZ9SAaZLcQ8TYiwNKr1h2u4CfnrQx7SUL8NWmChg,216
|
|
199
188
|
synapse_sdk/utils/converters/__init__.py,sha256=xQi_n7xS9BNyDiolsxH2jw1CtD6avxMPj2cHnwvidi8,11311
|
|
200
189
|
synapse_sdk/utils/converters/coco/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
201
|
-
synapse_sdk/utils/converters/coco/from_dm.py,sha256=
|
|
190
|
+
synapse_sdk/utils/converters/coco/from_dm.py,sha256=zmOrbkTruuXLTeL3hkHmaqM0UbHp7V-2tBCVHgxwQDk,11347
|
|
202
191
|
synapse_sdk/utils/converters/coco/to_dm.py,sha256=SOzzACYlK0vJE6SIpmFwMUV1ZbdmsQ_t5mceG0SQahE,9105
|
|
203
|
-
synapse_sdk/utils/converters/dm/__init__.py,sha256=
|
|
192
|
+
synapse_sdk/utils/converters/dm/__init__.py,sha256=st_c4sM_Gnb7k9bEQwetKBO8VZojupwCzeb7xDp3jqI,1961
|
|
204
193
|
synapse_sdk/utils/converters/dm/from_v1.py,sha256=4BG_NA_7YdW5rI1F8LCFg39M-IJZVfRgi2b9FBxTAmw,26059
|
|
205
194
|
synapse_sdk/utils/converters/dm/to_v1.py,sha256=A123zAR_dLqEW83BgAl5_J1ACstjZWTHivlW5qvOu_E,13432
|
|
206
195
|
synapse_sdk/utils/converters/pascal/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -221,9 +210,9 @@ synapse_sdk/utils/storage/providers/gcp.py,sha256=i2BQCu1Kej1If9SuNr2_lEyTcr5M_n
|
|
|
221
210
|
synapse_sdk/utils/storage/providers/http.py,sha256=2DhIulND47JOnS5ZY7MZUex7Su3peAPksGo1Wwg07L4,5828
|
|
222
211
|
synapse_sdk/utils/storage/providers/s3.py,sha256=ZmqekAvIgcQBdRU-QVJYv1Rlp6VHfXwtbtjTSphua94,2573
|
|
223
212
|
synapse_sdk/utils/storage/providers/sftp.py,sha256=_8s9hf0JXIO21gvm-JVS00FbLsbtvly4c-ETLRax68A,1426
|
|
224
|
-
synapse_sdk-1.0.
|
|
225
|
-
synapse_sdk-1.0.
|
|
226
|
-
synapse_sdk-1.0.
|
|
227
|
-
synapse_sdk-1.0.
|
|
228
|
-
synapse_sdk-1.0.
|
|
229
|
-
synapse_sdk-1.0.
|
|
213
|
+
synapse_sdk-1.0.0b2.dist-info/licenses/LICENSE,sha256=bKzmC5YAg4V1Fhl8OO_tqY8j62hgdncAkN7VrdjmrGk,1101
|
|
214
|
+
synapse_sdk-1.0.0b2.dist-info/METADATA,sha256=yE09zDvM8Acnx0R_9du9F4lOMfrDajKDlGrY90k9ZQw,3718
|
|
215
|
+
synapse_sdk-1.0.0b2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
216
|
+
synapse_sdk-1.0.0b2.dist-info/entry_points.txt,sha256=VNptJoGoNJI8yLXfBmhgUefMsmGI0m3-0YoMvrOgbxo,48
|
|
217
|
+
synapse_sdk-1.0.0b2.dist-info/top_level.txt,sha256=ytgJMRK1slVOKUpgcw3LEyHHP7S34J6n_gJzdkcSsw8,12
|
|
218
|
+
synapse_sdk-1.0.0b2.dist-info/RECORD,,
|
synapse_sdk/devtools/models.py
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
from typing import Any, Dict, List, Optional
|
|
2
|
-
|
|
3
|
-
from pydantic import BaseModel
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
class AgentStatus(BaseModel):
|
|
7
|
-
id: str
|
|
8
|
-
name: str
|
|
9
|
-
status: str # "running", "idle", "error", "stopped"
|
|
10
|
-
last_seen: str
|
|
11
|
-
resources: Dict[str, Any] = {}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
class LogEntry(BaseModel):
|
|
15
|
-
timestamp: str
|
|
16
|
-
level: str # "INFO", "WARNING", "ERROR", "DEBUG"
|
|
17
|
-
message: str
|
|
18
|
-
source: str
|
|
19
|
-
metadata: Dict[str, Any] = {}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
class DashboardStats(BaseModel):
|
|
23
|
-
ray_cluster: Dict[str, Any] = {}
|
|
24
|
-
backend: Dict[str, Any] = {}
|
|
25
|
-
connected_users: int = 0
|
|
26
|
-
active_jobs: int = 0
|
|
27
|
-
total_plugins: int = 0
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
class PluginInfo(BaseModel):
|
|
31
|
-
name: str
|
|
32
|
-
version: str
|
|
33
|
-
category: str
|
|
34
|
-
status: str
|
|
35
|
-
last_run: Optional[str] = None
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
class JobInfo(BaseModel):
|
|
39
|
-
id: str
|
|
40
|
-
plugin_name: str
|
|
41
|
-
status: str
|
|
42
|
-
started_at: str
|
|
43
|
-
completed_at: Optional[str] = None
|
|
44
|
-
progress: float = 0.0
|
|
45
|
-
logs: List[LogEntry] = []
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
class ConfigResponse(BaseModel):
|
|
49
|
-
config: Dict[str, Any]
|
|
50
|
-
file_path: str
|
|
51
|
-
last_modified: Optional[str] = None
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
class ConfigUpdateRequest(BaseModel):
|
|
55
|
-
config: Dict[str, Any]
|
synapse_sdk/devtools/utils.py
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import socket
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
def is_port_available(host: str, port: int) -> bool:
|
|
5
|
-
"""Check if a port is available on the given host"""
|
|
6
|
-
try:
|
|
7
|
-
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock:
|
|
8
|
-
sock.settimeout(1)
|
|
9
|
-
result = sock.connect_ex((host, port))
|
|
10
|
-
return result != 0
|
|
11
|
-
except (socket.error, OSError):
|
|
12
|
-
return False
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
def find_available_port(host: str, start_port: int, max_attempts: int = 10) -> int:
|
|
16
|
-
"""Find an available port starting from start_port"""
|
|
17
|
-
for port in range(start_port, start_port + max_attempts):
|
|
18
|
-
if is_port_available(host, port):
|
|
19
|
-
return port
|
|
20
|
-
raise RuntimeError(f'No available port found in range {start_port}-{start_port + max_attempts - 1}')
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
def get_local_ip() -> str:
|
|
24
|
-
"""Get the local IP address for client access"""
|
|
25
|
-
try:
|
|
26
|
-
# In WSL, return localhost since the server is accessible via localhost
|
|
27
|
-
if _is_wsl():
|
|
28
|
-
return '127.0.0.1'
|
|
29
|
-
|
|
30
|
-
with socket.socket(socket.AF_INET, socket.SOCK_DGRAM) as s:
|
|
31
|
-
s.connect(('8.8.8.8', 80))
|
|
32
|
-
return s.getsockname()[0]
|
|
33
|
-
except Exception:
|
|
34
|
-
# Fallback to localhost if we can't determine the local IP
|
|
35
|
-
return '127.0.0.1'
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
def _is_wsl() -> bool:
|
|
39
|
-
"""Check if we're running in WSL"""
|
|
40
|
-
try:
|
|
41
|
-
with open('/proc/version', 'r') as f:
|
|
42
|
-
content = f.read().lower()
|
|
43
|
-
return 'microsoft' in content or 'wsl' in content
|
|
44
|
-
except Exception:
|
|
45
|
-
return False
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
def get_display_host(server_host: str) -> str:
|
|
49
|
-
"""Get the appropriate host for display and frontend access"""
|
|
50
|
-
if server_host == '0.0.0.0':
|
|
51
|
-
return get_local_ip()
|
|
52
|
-
return server_host
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
## Usage
|
|
2
|
-
|
|
3
|
-
Those templates dependencies are maintained via [pnpm](https://pnpm.io) via `pnpm up -Lri`.
|
|
4
|
-
|
|
5
|
-
This is the reason you see a `pnpm-lock.yaml`. That being said, any package manager will work. This file can be safely be removed once you clone a template.
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
$ npm install # or pnpm install or yarn install
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
### Learn more on the [Solid Website](https://solidjs.com) and come chat with us on our [Discord](https://discord.com/invite/solidjs)
|
|
12
|
-
|
|
13
|
-
## Available Scripts
|
|
14
|
-
|
|
15
|
-
In the project directory, you can run:
|
|
16
|
-
|
|
17
|
-
### `npm run dev` or `npm start`
|
|
18
|
-
|
|
19
|
-
Runs the app in the development mode.<br>
|
|
20
|
-
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
|
|
21
|
-
|
|
22
|
-
The page will reload if you make edits.<br>
|
|
23
|
-
|
|
24
|
-
### `npm run build`
|
|
25
|
-
|
|
26
|
-
Builds the app for production to the `dist` folder.<br>
|
|
27
|
-
It correctly bundles Solid in production mode and optimizes the build for the best performance.
|
|
28
|
-
|
|
29
|
-
The build is minified and the filenames include the hashes.<br>
|
|
30
|
-
Your app is ready to be deployed!
|
|
31
|
-
|
|
32
|
-
## Deployment
|
|
33
|
-
|
|
34
|
-
You can deploy the `dist` folder to any static host provider (netlify, surge, now, etc.)
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8" />
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
-
<meta name="theme-color" content="#000000" />
|
|
7
|
-
<link rel="shortcut icon" type="image/ico" href="/assets/favicon-mtvwWgEY.ico" />
|
|
8
|
-
<title>Synapse SDK</title>
|
|
9
|
-
<script type="module" crossorigin src="/assets/index-C-6muTAU.js"></script>
|
|
10
|
-
<link rel="stylesheet" crossorigin href="/assets/index-DaWyc9aY.css">
|
|
11
|
-
</head>
|
|
12
|
-
<body>
|
|
13
|
-
<noscript>You need to enable JavaScript to run this app.</noscript>
|
|
14
|
-
<div id="root"></div>
|
|
15
|
-
|
|
16
|
-
</body>
|
|
17
|
-
</html>
|