figpack 0.2.3__tar.gz → 0.2.4__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.2.3/figpack.egg-info → figpack-0.2.4}/PKG-INFO +1 -1
- {figpack-0.2.3 → figpack-0.2.4}/figpack/__init__.py +1 -1
- {figpack-0.2.3 → figpack-0.2.4}/figpack/core/_server_manager.py +9 -3
- {figpack-0.2.3 → figpack-0.2.4}/figpack/core/_show_view.py +4 -1
- {figpack-0.2.3 → figpack-0.2.4}/figpack/core/_upload_bundle.py +2 -1
- {figpack-0.2.3 → figpack-0.2.4}/figpack/core/config.py +2 -0
- {figpack-0.2.3 → figpack-0.2.4}/figpack/core/figpack_view.py +9 -1
- figpack-0.2.3/figpack/figpack-gui-dist/assets/index-DUR9Dmwh.js → figpack-0.2.4/figpack/figpack-gui-dist/assets/index-CuFseOGX.js +67 -67
- {figpack-0.2.3 → figpack-0.2.4}/figpack/figpack-gui-dist/index.html +1 -1
- figpack-0.2.4/figpack/spike_sorting/views/RasterPlot.py +77 -0
- figpack-0.2.4/figpack/spike_sorting/views/RasterPlotItem.py +28 -0
- {figpack-0.2.3 → figpack-0.2.4}/figpack/spike_sorting/views/__init__.py +4 -0
- {figpack-0.2.3 → figpack-0.2.4/figpack.egg-info}/PKG-INFO +1 -1
- {figpack-0.2.3 → figpack-0.2.4}/figpack.egg-info/SOURCES.txt +3 -1
- {figpack-0.2.3 → figpack-0.2.4}/pyproject.toml +3 -3
- {figpack-0.2.3 → figpack-0.2.4}/LICENSE +0 -0
- {figpack-0.2.3 → figpack-0.2.4}/MANIFEST.in +0 -0
- {figpack-0.2.3 → figpack-0.2.4}/README.md +0 -0
- {figpack-0.2.3 → figpack-0.2.4}/figpack/cli.py +0 -0
- {figpack-0.2.3 → figpack-0.2.4}/figpack/core/__init__.py +0 -0
- {figpack-0.2.3 → figpack-0.2.4}/figpack/core/_bundle_utils.py +0 -0
- {figpack-0.2.3 → figpack-0.2.4}/figpack/figpack-gui-dist/assets/index-Cmae55E4.css +0 -0
- {figpack-0.2.3 → figpack-0.2.4}/figpack/figpack-gui-dist/assets/neurosift-logo-CLsuwLMO.png +0 -0
- {figpack-0.2.3 → figpack-0.2.4}/figpack/franklab/__init__.py +0 -0
- {figpack-0.2.3 → figpack-0.2.4}/figpack/franklab/views/TrackAnimation.py +0 -0
- {figpack-0.2.3 → figpack-0.2.4}/figpack/franklab/views/__init__.py +0 -0
- {figpack-0.2.3 → figpack-0.2.4}/figpack/spike_sorting/__init__.py +0 -0
- {figpack-0.2.3 → figpack-0.2.4}/figpack/spike_sorting/views/AutocorrelogramItem.py +0 -0
- {figpack-0.2.3 → figpack-0.2.4}/figpack/spike_sorting/views/Autocorrelograms.py +0 -0
- {figpack-0.2.3 → figpack-0.2.4}/figpack/spike_sorting/views/AverageWaveforms.py +0 -0
- {figpack-0.2.3 → figpack-0.2.4}/figpack/spike_sorting/views/CrossCorrelogramItem.py +0 -0
- {figpack-0.2.3 → figpack-0.2.4}/figpack/spike_sorting/views/CrossCorrelograms.py +0 -0
- {figpack-0.2.3 → figpack-0.2.4}/figpack/spike_sorting/views/SpikeAmplitudes.py +0 -0
- {figpack-0.2.3 → figpack-0.2.4}/figpack/spike_sorting/views/SpikeAmplitudesItem.py +0 -0
- {figpack-0.2.3 → figpack-0.2.4}/figpack/spike_sorting/views/UnitSimilarityScore.py +0 -0
- {figpack-0.2.3 → figpack-0.2.4}/figpack/spike_sorting/views/UnitsTable.py +0 -0
- {figpack-0.2.3 → figpack-0.2.4}/figpack/spike_sorting/views/UnitsTableColumn.py +0 -0
- {figpack-0.2.3 → figpack-0.2.4}/figpack/spike_sorting/views/UnitsTableRow.py +0 -0
- {figpack-0.2.3 → figpack-0.2.4}/figpack/views/Box.py +0 -0
- {figpack-0.2.3 → figpack-0.2.4}/figpack/views/Image.py +0 -0
- {figpack-0.2.3 → figpack-0.2.4}/figpack/views/LayoutItem.py +0 -0
- {figpack-0.2.3 → figpack-0.2.4}/figpack/views/Markdown.py +0 -0
- {figpack-0.2.3 → figpack-0.2.4}/figpack/views/MatplotlibFigure.py +0 -0
- {figpack-0.2.3 → figpack-0.2.4}/figpack/views/MultiChannelTimeseries.py +0 -0
- {figpack-0.2.3 → figpack-0.2.4}/figpack/views/PlotlyFigure.py +0 -0
- {figpack-0.2.3 → figpack-0.2.4}/figpack/views/Splitter.py +0 -0
- {figpack-0.2.3 → figpack-0.2.4}/figpack/views/TabLayout.py +0 -0
- {figpack-0.2.3 → figpack-0.2.4}/figpack/views/TabLayoutItem.py +0 -0
- {figpack-0.2.3 → figpack-0.2.4}/figpack/views/TimeseriesGraph.py +0 -0
- {figpack-0.2.3 → figpack-0.2.4}/figpack/views/__init__.py +0 -0
- {figpack-0.2.3 → figpack-0.2.4}/figpack.egg-info/dependency_links.txt +0 -0
- {figpack-0.2.3 → figpack-0.2.4}/figpack.egg-info/entry_points.txt +0 -0
- {figpack-0.2.3 → figpack-0.2.4}/figpack.egg-info/requires.txt +0 -0
- {figpack-0.2.3 → figpack-0.2.4}/figpack.egg-info/top_level.txt +0 -0
- {figpack-0.2.3 → figpack-0.2.4}/setup.cfg +0 -0
- {figpack-0.2.3 → figpack-0.2.4}/tests/test_average_waveforms.py +0 -0
- {figpack-0.2.3 → figpack-0.2.4}/tests/test_box.py +0 -0
- {figpack-0.2.3 → figpack-0.2.4}/tests/test_cli.py +0 -0
- {figpack-0.2.3 → figpack-0.2.4}/tests/test_core.py +0 -0
- {figpack-0.2.3 → figpack-0.2.4}/tests/test_figpack_view.py +0 -0
- {figpack-0.2.3 → figpack-0.2.4}/tests/test_image.py +0 -0
- {figpack-0.2.3 → figpack-0.2.4}/tests/test_markdown.py +0 -0
- {figpack-0.2.3 → figpack-0.2.4}/tests/test_matplotlib_figure.py +0 -0
- {figpack-0.2.3 → figpack-0.2.4}/tests/test_multichannel_timeseries.py +0 -0
- {figpack-0.2.3 → figpack-0.2.4}/tests/test_plotly_figure.py +0 -0
- {figpack-0.2.3 → figpack-0.2.4}/tests/test_show_view.py +0 -0
- {figpack-0.2.3 → figpack-0.2.4}/tests/test_spike_sorting_correlograms.py +0 -0
- {figpack-0.2.3 → figpack-0.2.4}/tests/test_splitter.py +0 -0
- {figpack-0.2.3 → figpack-0.2.4}/tests/test_tablayout.py +0 -0
- {figpack-0.2.3 → figpack-0.2.4}/tests/test_timeseries_graph.py +0 -0
- {figpack-0.2.3 → figpack-0.2.4}/tests/test_track_animation.py +0 -0
- {figpack-0.2.3 → figpack-0.2.4}/tests/test_units_table.py +0 -0
|
@@ -138,11 +138,17 @@ class ProcessServerManager:
|
|
|
138
138
|
self._create_process_info_file()
|
|
139
139
|
return self._temp_dir
|
|
140
140
|
|
|
141
|
-
def create_figure_subdir(
|
|
141
|
+
def create_figure_subdir(
|
|
142
|
+
self, *, _local_figure_name: Optional[str] = None
|
|
143
|
+
) -> pathlib.Path:
|
|
142
144
|
"""Create a unique subdirectory for a figure within the process temp dir."""
|
|
143
145
|
temp_dir = self.get_temp_dir()
|
|
144
|
-
|
|
145
|
-
|
|
146
|
+
local_figure_name = (
|
|
147
|
+
"figure_" + str(uuid.uuid4())[:8]
|
|
148
|
+
if _local_figure_name is None
|
|
149
|
+
else _local_figure_name
|
|
150
|
+
)
|
|
151
|
+
figure_dir = temp_dir / f"{local_figure_name}"
|
|
146
152
|
figure_dir.mkdir(exist_ok=True)
|
|
147
153
|
return figure_dir
|
|
148
154
|
|
|
@@ -93,6 +93,7 @@ def _show_view(
|
|
|
93
93
|
description: Union[str, None] = None,
|
|
94
94
|
inline: Union[bool, None] = None,
|
|
95
95
|
inline_height: int = 600,
|
|
96
|
+
_local_figure_name: Union[str, None] = None,
|
|
96
97
|
):
|
|
97
98
|
# Determine if we should use inline display
|
|
98
99
|
use_inline = inline
|
|
@@ -136,7 +137,9 @@ def _show_view(
|
|
|
136
137
|
server_manager = ProcessServerManager.get_instance()
|
|
137
138
|
|
|
138
139
|
# Create figure subdirectory in process temp directory
|
|
139
|
-
figure_dir = server_manager.create_figure_subdir(
|
|
140
|
+
figure_dir = server_manager.create_figure_subdir(
|
|
141
|
+
_local_figure_name=_local_figure_name
|
|
142
|
+
)
|
|
140
143
|
|
|
141
144
|
# Prepare the figure bundle in the subdirectory
|
|
142
145
|
prepare_figure_bundle(
|
|
@@ -11,7 +11,7 @@ import requests
|
|
|
11
11
|
|
|
12
12
|
from .. import __version__
|
|
13
13
|
|
|
14
|
-
from .config import FIGPACK_API_BASE_URL
|
|
14
|
+
from .config import FIGPACK_API_BASE_URL, FIGPACK_BUCKET
|
|
15
15
|
|
|
16
16
|
thisdir = pathlib.Path(__file__).parent.resolve()
|
|
17
17
|
|
|
@@ -156,6 +156,7 @@ def _create_or_get_figure(
|
|
|
156
156
|
payload = {
|
|
157
157
|
"figureHash": figure_hash,
|
|
158
158
|
"figpackVersion": __version__,
|
|
159
|
+
"bucket": FIGPACK_BUCKET,
|
|
159
160
|
}
|
|
160
161
|
|
|
161
162
|
# API key is optional for ephemeral figures
|
|
@@ -75,8 +75,15 @@ class FigpackView:
|
|
|
75
75
|
if upload:
|
|
76
76
|
raise ValueError("Cannot upload when _dev is True.")
|
|
77
77
|
|
|
78
|
+
# make a random figure name
|
|
79
|
+
import random
|
|
80
|
+
import string
|
|
81
|
+
|
|
82
|
+
_local_figure_name = "fig_" + "".join(
|
|
83
|
+
random.choices(string.ascii_lowercase + string.digits, k=8)
|
|
84
|
+
)
|
|
78
85
|
print(
|
|
79
|
-
f"For development, run figpack-gui in dev mode and use http://localhost:5173?data=http://localhost:{port}/data.zarr"
|
|
86
|
+
f"For development, run figpack-gui in dev mode and use http://localhost:5173?data=http://localhost:{port}/{_local_figure_name}/data.zarr"
|
|
80
87
|
)
|
|
81
88
|
open_in_browser = False
|
|
82
89
|
|
|
@@ -91,6 +98,7 @@ class FigpackView:
|
|
|
91
98
|
description=description,
|
|
92
99
|
inline=inline,
|
|
93
100
|
inline_height=inline_height,
|
|
101
|
+
_local_figure_name=_local_figure_name if _dev else None,
|
|
94
102
|
)
|
|
95
103
|
|
|
96
104
|
def _write_to_zarr_group(self, group: zarr.Group) -> None:
|