figpack 0.2.40__tar.gz → 0.3.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.
- {figpack-0.2.40/figpack.egg-info → figpack-0.3.1}/PKG-INFO +2 -2
- {figpack-0.2.40 → figpack-0.3.1}/README.md +1 -1
- {figpack-0.2.40 → figpack-0.3.1}/figpack/__init__.py +1 -1
- {figpack-0.2.40 → figpack-0.3.1}/figpack/core/_upload_bundle.py +23 -8
- {figpack-0.2.40 → figpack-0.3.1}/figpack/core/config.py +1 -1
- {figpack-0.2.40 → figpack-0.3.1/figpack.egg-info}/PKG-INFO +2 -2
- {figpack-0.2.40 → figpack-0.3.1}/pyproject.toml +1 -1
- {figpack-0.2.40 → figpack-0.3.1}/tests/test_upload_bundle.py +0 -3
- {figpack-0.2.40 → figpack-0.3.1}/LICENSE +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/MANIFEST.in +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/figpack/cli.py +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/figpack/core/__init__.py +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/figpack/core/_bundle_utils.py +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/figpack/core/_file_handler.py +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/figpack/core/_save_figure.py +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/figpack/core/_server_manager.py +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/figpack/core/_show_view.py +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/figpack/core/_view_figure.py +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/figpack/core/_zarr_consolidate.py +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/figpack/core/extension_view.py +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/figpack/core/figpack_extension.py +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/figpack/core/figpack_view.py +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/figpack/core/zarr.py +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/figpack/extensions.py +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/figpack/figpack-figure-dist/assets/index-ST_DU17U.js +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/figpack/figpack-figure-dist/assets/index-V5m_wCvw.css +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/figpack/figpack-figure-dist/assets/neurosift-logo-CLsuwLMO.png +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/figpack/figpack-figure-dist/index.html +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/figpack/views/Box.py +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/figpack/views/CaptionedView.py +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/figpack/views/DataFrame.py +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/figpack/views/Gallery.py +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/figpack/views/GalleryItem.py +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/figpack/views/Iframe.py +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/figpack/views/Image.py +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/figpack/views/LayoutItem.py +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/figpack/views/Markdown.py +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/figpack/views/MatplotlibFigure.py +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/figpack/views/MountainLayout.py +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/figpack/views/MountainLayoutItem.py +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/figpack/views/MultiChannelTimeseries.py +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/figpack/views/PlotlyExtension/PlotlyExtension.py +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/figpack/views/PlotlyExtension/__init__.py +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/figpack/views/PlotlyExtension/_plotly_extension.py +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/figpack/views/PlotlyExtension/plotly_view.js +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/figpack/views/Spectrogram.py +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/figpack/views/Splitter.py +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/figpack/views/TabLayout.py +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/figpack/views/TabLayoutItem.py +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/figpack/views/TimeseriesGraph.py +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/figpack/views/__init__.py +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/figpack.egg-info/SOURCES.txt +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/figpack.egg-info/dependency_links.txt +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/figpack.egg-info/entry_points.txt +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/figpack.egg-info/requires.txt +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/figpack.egg-info/top_level.txt +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/setup.cfg +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/tests/test_box.py +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/tests/test_cli.py +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/tests/test_core.py +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/tests/test_dataframe.py +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/tests/test_extension_system.py +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/tests/test_figpack_view.py +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/tests/test_file_handler.py +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/tests/test_gallery.py +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/tests/test_image.py +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/tests/test_markdown.py +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/tests/test_matplotlib_figure.py +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/tests/test_multichannel_timeseries.py +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/tests/test_plotly_figure.py +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/tests/test_server_manager.py +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/tests/test_spectrogram.py +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/tests/test_splitter.py +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/tests/test_tablayout.py +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/tests/test_timeseries_graph.py +0 -0
- {figpack-0.2.40 → figpack-0.3.1}/tests/test_view_figure.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: figpack
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.1
|
|
4
4
|
Summary: A Python package for creating shareable, interactive visualizations in the browser
|
|
5
5
|
Author-email: Jeremy Magland <jmagland@flatironinstitute.org>
|
|
6
6
|
License: Apache-2.0
|
|
@@ -133,7 +133,7 @@ If you use figpack in your research, please cite it:
|
|
|
133
133
|
|
|
134
134
|
Or in APA format:
|
|
135
135
|
|
|
136
|
-
> Magland, J. (2025). figpack (Version 0.
|
|
136
|
+
> Magland, J. (2025). figpack (Version 0.3.1) [Computer software]. Zenodo. https://doi.org/10.5281/zenodo.17419621
|
|
137
137
|
|
|
138
138
|
## Contributing
|
|
139
139
|
|
|
@@ -57,7 +57,7 @@ If you use figpack in your research, please cite it:
|
|
|
57
57
|
|
|
58
58
|
Or in APA format:
|
|
59
59
|
|
|
60
|
-
> Magland, J. (2025). figpack (Version 0.
|
|
60
|
+
> Magland, J. (2025). figpack (Version 0.3.1) [Computer software]. Zenodo. https://doi.org/10.5281/zenodo.17419621
|
|
61
61
|
|
|
62
62
|
## Contributing
|
|
63
63
|
|
|
@@ -36,10 +36,16 @@ def _get_batch_signed_urls(figure_url: str, files_batch: list, api_key: str) ->
|
|
|
36
36
|
payload = {
|
|
37
37
|
"figureUrl": figure_url,
|
|
38
38
|
"files": files_data,
|
|
39
|
-
"apiKey": api_key,
|
|
40
39
|
}
|
|
41
40
|
|
|
42
|
-
|
|
41
|
+
headers = {
|
|
42
|
+
"Content-Type": "application/json",
|
|
43
|
+
"x-api-key": api_key if api_key else "",
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
response = requests.post(
|
|
47
|
+
f"{FIGPACK_API_BASE_URL}/upload", json=payload, headers=headers
|
|
48
|
+
)
|
|
43
49
|
|
|
44
50
|
if not response.ok:
|
|
45
51
|
try:
|
|
@@ -154,8 +160,8 @@ def _create_or_get_figure(
|
|
|
154
160
|
}
|
|
155
161
|
|
|
156
162
|
# API key is optional for ephemeral figures
|
|
157
|
-
if api_key is not None:
|
|
158
|
-
|
|
163
|
+
# if api_key is not None:
|
|
164
|
+
# payload["apiKey"] = api_key
|
|
159
165
|
|
|
160
166
|
if total_files is not None:
|
|
161
167
|
payload["totalFiles"] = total_files
|
|
@@ -169,7 +175,12 @@ def _create_or_get_figure(
|
|
|
169
175
|
payload["sourceUrl"] = source_url
|
|
170
176
|
|
|
171
177
|
# Use the same endpoint for both regular and ephemeral figures
|
|
172
|
-
|
|
178
|
+
url = f"{FIGPACK_API_BASE_URL}/figures/create"
|
|
179
|
+
headers = {
|
|
180
|
+
"Content-Type": "application/json",
|
|
181
|
+
"x-api-key": api_key if api_key else "",
|
|
182
|
+
}
|
|
183
|
+
response = requests.post(url, json=payload, headers=headers)
|
|
173
184
|
|
|
174
185
|
if not response.ok:
|
|
175
186
|
try:
|
|
@@ -197,11 +208,15 @@ def _finalize_figure(figure_url: str, api_key: str) -> dict:
|
|
|
197
208
|
"""
|
|
198
209
|
payload = {
|
|
199
210
|
"figureUrl": figure_url,
|
|
200
|
-
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
headers = {
|
|
214
|
+
"Content-Type": "application/json",
|
|
215
|
+
"x-api-key": api_key if api_key else "",
|
|
201
216
|
}
|
|
202
217
|
|
|
203
218
|
response = requests.post(
|
|
204
|
-
f"{FIGPACK_API_BASE_URL}/
|
|
219
|
+
f"{FIGPACK_API_BASE_URL}/figures/finalize", json=payload, headers=headers
|
|
205
220
|
)
|
|
206
221
|
|
|
207
222
|
if not response.ok:
|
|
@@ -416,7 +431,7 @@ def get_figure_by_source_url(source_url: str) -> Optional[str]:
|
|
|
416
431
|
payload = {"sourceUrl": source_url}
|
|
417
432
|
|
|
418
433
|
response = requests.post(
|
|
419
|
-
f"{FIGPACK_API_BASE_URL}/
|
|
434
|
+
f"{FIGPACK_API_BASE_URL}/figures/find-by-source-url", json=payload
|
|
420
435
|
)
|
|
421
436
|
|
|
422
437
|
if not response.ok:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: figpack
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.1
|
|
4
4
|
Summary: A Python package for creating shareable, interactive visualizations in the browser
|
|
5
5
|
Author-email: Jeremy Magland <jmagland@flatironinstitute.org>
|
|
6
6
|
License: Apache-2.0
|
|
@@ -133,7 +133,7 @@ If you use figpack in your research, please cite it:
|
|
|
133
133
|
|
|
134
134
|
Or in APA format:
|
|
135
135
|
|
|
136
|
-
> Magland, J. (2025). figpack (Version 0.
|
|
136
|
+
> Magland, J. (2025). figpack (Version 0.3.1) [Computer software]. Zenodo. https://doi.org/10.5281/zenodo.17419621
|
|
137
137
|
|
|
138
138
|
## Contributing
|
|
139
139
|
|
|
@@ -49,7 +49,6 @@ def test_get_batch_signed_urls(tmp_path):
|
|
|
49
49
|
called_payload = mock_post.call_args[1]["json"]
|
|
50
50
|
assert "upload" in called_url
|
|
51
51
|
assert called_payload["figureUrl"] == figure_url
|
|
52
|
-
assert called_payload["apiKey"] == api_key
|
|
53
52
|
assert len(called_payload["files"]) == 2
|
|
54
53
|
|
|
55
54
|
|
|
@@ -138,7 +137,6 @@ def test_create_or_get_figure():
|
|
|
138
137
|
assert result["figure"]["status"] == "pending"
|
|
139
138
|
|
|
140
139
|
mock_post.assert_called_once()
|
|
141
|
-
assert mock_post.call_args[1]["json"]["apiKey"] == api_key
|
|
142
140
|
|
|
143
141
|
|
|
144
142
|
def test_create_or_get_figure_error():
|
|
@@ -170,7 +168,6 @@ def test_finalize_figure():
|
|
|
170
168
|
|
|
171
169
|
mock_post.assert_called_once()
|
|
172
170
|
assert mock_post.call_args[1]["json"]["figureUrl"] == figure_url
|
|
173
|
-
assert mock_post.call_args[1]["json"]["apiKey"] == api_key
|
|
174
171
|
|
|
175
172
|
|
|
176
173
|
def test_determine_content_type():
|
|
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
|
{figpack-0.2.40 → figpack-0.3.1}/figpack/figpack-figure-dist/assets/neurosift-logo-CLsuwLMO.png
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
|
|
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
|