figpack 0.1.6__tar.gz → 0.1.7__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.
Potentially problematic release.
This version of figpack might be problematic. Click here for more details.
- {figpack-0.1.6/figpack.egg-info → figpack-0.1.7}/PKG-INFO +1 -1
- {figpack-0.1.6 → figpack-0.1.7}/figpack/__init__.py +1 -1
- {figpack-0.1.6 → figpack-0.1.7}/figpack/core/_show_view.py +1 -1
- {figpack-0.1.6 → figpack-0.1.7}/figpack/core/_upload_bundle.py +18 -3
- figpack-0.1.7/figpack/core/config.py +5 -0
- {figpack-0.1.6 → figpack-0.1.7/figpack.egg-info}/PKG-INFO +1 -1
- {figpack-0.1.6 → figpack-0.1.7}/pyproject.toml +1 -1
- figpack-0.1.6/figpack/core/config.py +0 -1
- {figpack-0.1.6 → figpack-0.1.7}/LICENSE +0 -0
- {figpack-0.1.6 → figpack-0.1.7}/MANIFEST.in +0 -0
- {figpack-0.1.6 → figpack-0.1.7}/README.md +0 -0
- {figpack-0.1.6 → figpack-0.1.7}/figpack/cli.py +0 -0
- {figpack-0.1.6 → figpack-0.1.7}/figpack/core/__init__.py +0 -0
- {figpack-0.1.6 → figpack-0.1.7}/figpack/core/_bundle_utils.py +0 -0
- {figpack-0.1.6 → figpack-0.1.7}/figpack/core/figpack_view.py +0 -0
- {figpack-0.1.6 → figpack-0.1.7}/figpack/figpack-gui-dist/assets/index-BDa2iJW9.css +0 -0
- {figpack-0.1.6 → figpack-0.1.7}/figpack/figpack-gui-dist/assets/index-DaeClgi6.js +0 -0
- {figpack-0.1.6 → figpack-0.1.7}/figpack/figpack-gui-dist/assets/neurosift-logo-CLsuwLMO.png +0 -0
- {figpack-0.1.6 → figpack-0.1.7}/figpack/figpack-gui-dist/index.html +0 -0
- {figpack-0.1.6 → figpack-0.1.7}/figpack/spike_sorting/__init__.py +0 -0
- {figpack-0.1.6 → figpack-0.1.7}/figpack/spike_sorting/views/AutocorrelogramItem.py +0 -0
- {figpack-0.1.6 → figpack-0.1.7}/figpack/spike_sorting/views/Autocorrelograms.py +0 -0
- {figpack-0.1.6 → figpack-0.1.7}/figpack/spike_sorting/views/CrossCorrelogramItem.py +0 -0
- {figpack-0.1.6 → figpack-0.1.7}/figpack/spike_sorting/views/CrossCorrelograms.py +0 -0
- {figpack-0.1.6 → figpack-0.1.7}/figpack/spike_sorting/views/UnitSimilarityScore.py +0 -0
- {figpack-0.1.6 → figpack-0.1.7}/figpack/spike_sorting/views/UnitsTable.py +0 -0
- {figpack-0.1.6 → figpack-0.1.7}/figpack/spike_sorting/views/UnitsTableColumn.py +0 -0
- {figpack-0.1.6 → figpack-0.1.7}/figpack/spike_sorting/views/UnitsTableRow.py +0 -0
- {figpack-0.1.6 → figpack-0.1.7}/figpack/spike_sorting/views/__init__.py +0 -0
- {figpack-0.1.6 → figpack-0.1.7}/figpack/views/Box.py +0 -0
- {figpack-0.1.6 → figpack-0.1.7}/figpack/views/Image.py +0 -0
- {figpack-0.1.6 → figpack-0.1.7}/figpack/views/LayoutItem.py +0 -0
- {figpack-0.1.6 → figpack-0.1.7}/figpack/views/Markdown.py +0 -0
- {figpack-0.1.6 → figpack-0.1.7}/figpack/views/MatplotlibFigure.py +0 -0
- {figpack-0.1.6 → figpack-0.1.7}/figpack/views/MultiChannelTimeseries.py +0 -0
- {figpack-0.1.6 → figpack-0.1.7}/figpack/views/PlotlyFigure.py +0 -0
- {figpack-0.1.6 → figpack-0.1.7}/figpack/views/Splitter.py +0 -0
- {figpack-0.1.6 → figpack-0.1.7}/figpack/views/TabLayout.py +0 -0
- {figpack-0.1.6 → figpack-0.1.7}/figpack/views/TabLayoutItem.py +0 -0
- {figpack-0.1.6 → figpack-0.1.7}/figpack/views/TimeseriesGraph.py +0 -0
- {figpack-0.1.6 → figpack-0.1.7}/figpack/views/__init__.py +0 -0
- {figpack-0.1.6 → figpack-0.1.7}/figpack.egg-info/SOURCES.txt +0 -0
- {figpack-0.1.6 → figpack-0.1.7}/figpack.egg-info/dependency_links.txt +0 -0
- {figpack-0.1.6 → figpack-0.1.7}/figpack.egg-info/entry_points.txt +0 -0
- {figpack-0.1.6 → figpack-0.1.7}/figpack.egg-info/requires.txt +0 -0
- {figpack-0.1.6 → figpack-0.1.7}/figpack.egg-info/top_level.txt +0 -0
- {figpack-0.1.6 → figpack-0.1.7}/setup.cfg +0 -0
- {figpack-0.1.6 → figpack-0.1.7}/tests/test_box.py +0 -0
- {figpack-0.1.6 → figpack-0.1.7}/tests/test_cli.py +0 -0
- {figpack-0.1.6 → figpack-0.1.7}/tests/test_core.py +0 -0
- {figpack-0.1.6 → figpack-0.1.7}/tests/test_figpack_view.py +0 -0
- {figpack-0.1.6 → figpack-0.1.7}/tests/test_image.py +0 -0
- {figpack-0.1.6 → figpack-0.1.7}/tests/test_markdown.py +0 -0
- {figpack-0.1.6 → figpack-0.1.7}/tests/test_matplotlib_figure.py +0 -0
- {figpack-0.1.6 → figpack-0.1.7}/tests/test_multichannel_timeseries.py +0 -0
- {figpack-0.1.6 → figpack-0.1.7}/tests/test_plotly_figure.py +0 -0
- {figpack-0.1.6 → figpack-0.1.7}/tests/test_show_view.py +0 -0
- {figpack-0.1.6 → figpack-0.1.7}/tests/test_spike_sorting_correlograms.py +0 -0
- {figpack-0.1.6 → figpack-0.1.7}/tests/test_splitter.py +0 -0
- {figpack-0.1.6 → figpack-0.1.7}/tests/test_tablayout.py +0 -0
- {figpack-0.1.6 → figpack-0.1.7}/tests/test_timeseries_graph.py +0 -0
- {figpack-0.1.6 → figpack-0.1.7}/tests/test_units_table.py +0 -0
- {figpack-0.1.6 → figpack-0.1.7}/tests/test_upload_bundle.py +0 -0
|
@@ -106,11 +106,22 @@ def _compute_deterministic_figure_hash(tmpdir_path: pathlib.Path) -> str:
|
|
|
106
106
|
|
|
107
107
|
|
|
108
108
|
def _create_or_get_figure(
|
|
109
|
-
figure_hash: str,
|
|
109
|
+
figure_hash: str,
|
|
110
|
+
api_key: str,
|
|
111
|
+
total_files: int = None,
|
|
112
|
+
total_size: int = None,
|
|
113
|
+
title: str = None,
|
|
110
114
|
) -> dict:
|
|
111
115
|
"""
|
|
112
116
|
Create a new figure or get existing figure information
|
|
113
117
|
|
|
118
|
+
Args:
|
|
119
|
+
figure_hash: The hash of the figure
|
|
120
|
+
api_key: The API key for authentication
|
|
121
|
+
total_files: Optional total number of files
|
|
122
|
+
total_size: Optional total size of files
|
|
123
|
+
title: Optional title for the figure
|
|
124
|
+
|
|
114
125
|
Returns:
|
|
115
126
|
dict: Figure information from the API
|
|
116
127
|
"""
|
|
@@ -124,6 +135,8 @@ def _create_or_get_figure(
|
|
|
124
135
|
payload["totalFiles"] = total_files
|
|
125
136
|
if total_size is not None:
|
|
126
137
|
payload["totalSize"] = total_size
|
|
138
|
+
if title is not None:
|
|
139
|
+
payload["title"] = title
|
|
127
140
|
|
|
128
141
|
response = requests.post(f"{FIGPACK_API_BASE_URL}/api/figures/create", json=payload)
|
|
129
142
|
|
|
@@ -177,7 +190,7 @@ def _finalize_figure(figure_url: str, api_key: str) -> dict:
|
|
|
177
190
|
return response_data
|
|
178
191
|
|
|
179
192
|
|
|
180
|
-
def _upload_bundle(tmpdir: str, api_key: str) -> str:
|
|
193
|
+
def _upload_bundle(tmpdir: str, api_key: str, title: str = None) -> str:
|
|
181
194
|
"""
|
|
182
195
|
Upload the prepared bundle to the cloud using the new database-driven approach
|
|
183
196
|
"""
|
|
@@ -203,7 +216,9 @@ def _upload_bundle(tmpdir: str, api_key: str) -> str:
|
|
|
203
216
|
)
|
|
204
217
|
|
|
205
218
|
# Find available figure ID and create/get figure in database with metadata
|
|
206
|
-
result = _create_or_get_figure(
|
|
219
|
+
result = _create_or_get_figure(
|
|
220
|
+
figure_hash, api_key, total_files, total_size, title=title
|
|
221
|
+
)
|
|
207
222
|
figure_info = result.get("figure", {})
|
|
208
223
|
figure_url = figure_info.get("figureUrl")
|
|
209
224
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
FIGPACK_API_BASE_URL = "https://figpack-api.vercel.app"
|
|
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
|
|
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
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|