figpack 0.2.20__tar.gz → 0.2.22__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.20/figpack.egg-info → figpack-0.2.22}/PKG-INFO +2 -1
- {figpack-0.2.20 → figpack-0.2.22}/figpack/__init__.py +1 -1
- {figpack-0.2.20 → figpack-0.2.22}/figpack/core/_bundle_utils.py +1 -1
- {figpack-0.2.20 → figpack-0.2.22}/figpack/core/_upload_bundle.py +0 -2
- {figpack-0.2.20 → figpack-0.2.22}/figpack/core/extension_view.py +2 -2
- {figpack-0.2.20 → figpack-0.2.22}/figpack/core/figpack_view.py +10 -7
- figpack-0.2.22/figpack/figpack-figure-dist/assets/index-LugXZ9DB.js +95 -0
- {figpack-0.2.20 → figpack-0.2.22}/figpack/figpack-figure-dist/index.html +1 -1
- {figpack-0.2.20 → figpack-0.2.22}/figpack/views/Box.py +2 -2
- {figpack-0.2.20 → figpack-0.2.22}/figpack/views/DataFrame.py +1 -1
- {figpack-0.2.20 → figpack-0.2.22}/figpack/views/Gallery.py +2 -2
- {figpack-0.2.20 → figpack-0.2.22}/figpack/views/Image.py +1 -1
- {figpack-0.2.20 → figpack-0.2.22}/figpack/views/Markdown.py +1 -1
- {figpack-0.2.20 → figpack-0.2.22}/figpack/views/MatplotlibFigure.py +1 -1
- {figpack-0.2.20 → figpack-0.2.22}/figpack/views/MultiChannelTimeseries.py +1 -1
- {figpack-0.2.20 → figpack-0.2.22}/figpack/views/PlotlyExtension/PlotlyExtension.py +2 -2
- {figpack-0.2.20 → figpack-0.2.22}/figpack/views/Spectrogram.py +1 -1
- {figpack-0.2.20 → figpack-0.2.22}/figpack/views/Splitter.py +3 -3
- {figpack-0.2.20 → figpack-0.2.22}/figpack/views/TabLayout.py +2 -2
- {figpack-0.2.20 → figpack-0.2.22}/figpack/views/TimeseriesGraph.py +9 -9
- {figpack-0.2.20 → figpack-0.2.22/figpack.egg-info}/PKG-INFO +2 -1
- {figpack-0.2.20 → figpack-0.2.22}/figpack.egg-info/SOURCES.txt +1 -1
- {figpack-0.2.20 → figpack-0.2.22}/figpack.egg-info/requires.txt +1 -0
- {figpack-0.2.20 → figpack-0.2.22}/pyproject.toml +3 -2
- {figpack-0.2.20 → figpack-0.2.22}/tests/test_box.py +1 -1
- {figpack-0.2.20 → figpack-0.2.22}/tests/test_core.py +4 -4
- {figpack-0.2.20 → figpack-0.2.22}/tests/test_dataframe.py +9 -9
- {figpack-0.2.20 → figpack-0.2.22}/tests/test_extension_system.py +1 -1
- {figpack-0.2.20 → figpack-0.2.22}/tests/test_figpack_view.py +4 -4
- {figpack-0.2.20 → figpack-0.2.22}/tests/test_gallery.py +2 -2
- {figpack-0.2.20 → figpack-0.2.22}/tests/test_image.py +2 -2
- {figpack-0.2.20 → figpack-0.2.22}/tests/test_markdown.py +4 -4
- {figpack-0.2.20 → figpack-0.2.22}/tests/test_matplotlib_figure.py +5 -5
- {figpack-0.2.20 → figpack-0.2.22}/tests/test_multichannel_timeseries.py +2 -2
- {figpack-0.2.20 → figpack-0.2.22}/tests/test_plotly_figure.py +3 -3
- {figpack-0.2.20 → figpack-0.2.22}/tests/test_splitter.py +2 -2
- {figpack-0.2.20 → figpack-0.2.22}/tests/test_tablayout.py +3 -3
- {figpack-0.2.20 → figpack-0.2.22}/tests/test_timeseries_graph.py +1 -1
- figpack-0.2.20/figpack/figpack-figure-dist/assets/index-CCpqUNwD.js +0 -107
- {figpack-0.2.20 → figpack-0.2.22}/LICENSE +0 -0
- {figpack-0.2.20 → figpack-0.2.22}/MANIFEST.in +0 -0
- {figpack-0.2.20 → figpack-0.2.22}/README.md +0 -0
- {figpack-0.2.20 → figpack-0.2.22}/figpack/cli.py +0 -0
- {figpack-0.2.20 → figpack-0.2.22}/figpack/core/__init__.py +0 -0
- {figpack-0.2.20 → figpack-0.2.22}/figpack/core/_file_handler.py +0 -0
- {figpack-0.2.20 → figpack-0.2.22}/figpack/core/_save_figure.py +0 -0
- {figpack-0.2.20 → figpack-0.2.22}/figpack/core/_server_manager.py +0 -0
- {figpack-0.2.20 → figpack-0.2.22}/figpack/core/_show_view.py +0 -0
- {figpack-0.2.20 → figpack-0.2.22}/figpack/core/_view_figure.py +0 -0
- {figpack-0.2.20 → figpack-0.2.22}/figpack/core/config.py +0 -0
- {figpack-0.2.20 → figpack-0.2.22}/figpack/core/figpack_extension.py +0 -0
- {figpack-0.2.20 → figpack-0.2.22}/figpack/core/zarr.py +0 -0
- {figpack-0.2.20 → figpack-0.2.22}/figpack/extensions.py +0 -0
- {figpack-0.2.20 → figpack-0.2.22}/figpack/figpack-figure-dist/assets/index-V5m_wCvw.css +0 -0
- {figpack-0.2.20 → figpack-0.2.22}/figpack/figpack-figure-dist/assets/neurosift-logo-CLsuwLMO.png +0 -0
- {figpack-0.2.20 → figpack-0.2.22}/figpack/views/GalleryItem.py +0 -0
- {figpack-0.2.20 → figpack-0.2.22}/figpack/views/LayoutItem.py +0 -0
- {figpack-0.2.20 → figpack-0.2.22}/figpack/views/PlotlyExtension/__init__.py +0 -0
- {figpack-0.2.20 → figpack-0.2.22}/figpack/views/PlotlyExtension/_plotly_extension.py +0 -0
- {figpack-0.2.20 → figpack-0.2.22}/figpack/views/PlotlyExtension/plotly_view.js +0 -0
- {figpack-0.2.20 → figpack-0.2.22}/figpack/views/TabLayoutItem.py +0 -0
- {figpack-0.2.20 → figpack-0.2.22}/figpack/views/__init__.py +0 -0
- {figpack-0.2.20 → figpack-0.2.22}/figpack.egg-info/dependency_links.txt +0 -0
- {figpack-0.2.20 → figpack-0.2.22}/figpack.egg-info/entry_points.txt +0 -0
- {figpack-0.2.20 → figpack-0.2.22}/figpack.egg-info/top_level.txt +0 -0
- {figpack-0.2.20 → figpack-0.2.22}/setup.cfg +0 -0
- {figpack-0.2.20 → figpack-0.2.22}/tests/test_cli.py +0 -0
- {figpack-0.2.20 → figpack-0.2.22}/tests/test_file_handler.py +0 -0
- {figpack-0.2.20 → figpack-0.2.22}/tests/test_server_manager.py +0 -0
- {figpack-0.2.20 → figpack-0.2.22}/tests/test_spectrogram.py +0 -0
- {figpack-0.2.20 → figpack-0.2.22}/tests/test_upload_bundle.py +0 -0
- {figpack-0.2.20 → figpack-0.2.22}/tests/test_view_figure.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: figpack
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.22
|
|
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
|
|
@@ -70,6 +70,7 @@ Requires-Dist: sphinx-autobuild>=2021.3.14; extra == "docs"
|
|
|
70
70
|
Requires-Dist: linkify-it-py>=2.0; extra == "docs"
|
|
71
71
|
Requires-Dist: sphinx-copybutton>=0.5; extra == "docs"
|
|
72
72
|
Requires-Dist: lindi; extra == "docs"
|
|
73
|
+
Requires-Dist: nibabel; extra == "docs"
|
|
73
74
|
Dynamic: license-file
|
|
74
75
|
|
|
75
76
|
# figpack
|
|
@@ -58,7 +58,7 @@ def prepare_figure_bundle(
|
|
|
58
58
|
# Write the view data to the Zarr group
|
|
59
59
|
zarr_group = zarr.open_group(pathlib.Path(tmpdir) / "data.zarr", mode="w")
|
|
60
60
|
zarr_group = Group(zarr_group)
|
|
61
|
-
view.
|
|
61
|
+
view.write_to_zarr_group(zarr_group)
|
|
62
62
|
|
|
63
63
|
# Add title and description as attributes on the top-level zarr group
|
|
64
64
|
zarr_group.attrs["title"] = title
|
|
@@ -23,10 +23,10 @@ class ExtensionView(FigpackView):
|
|
|
23
23
|
self.extension = extension
|
|
24
24
|
self.view_type = view_type
|
|
25
25
|
|
|
26
|
-
def
|
|
26
|
+
def write_to_zarr_group(self, group: Group) -> None:
|
|
27
27
|
"""
|
|
28
28
|
Write the extension view metadata to a Zarr group.
|
|
29
|
-
Subclasses should call super().
|
|
29
|
+
Subclasses should call super().write_to_zarr_group(group) first,
|
|
30
30
|
then add their own data.
|
|
31
31
|
|
|
32
32
|
Args:
|
|
@@ -62,11 +62,14 @@ class FigpackView:
|
|
|
62
62
|
if upload is None:
|
|
63
63
|
upload = os.environ.get("FIGPACK_UPLOAD") == "1"
|
|
64
64
|
else:
|
|
65
|
-
if upload is True
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
65
|
+
if upload is True:
|
|
66
|
+
if ephemeral is True:
|
|
67
|
+
# ephemeral is reserved for the case where we don't specify upload
|
|
68
|
+
# and we are in a notebook in a remote environment such as
|
|
69
|
+
# colab or jupyterhub
|
|
70
|
+
raise ValueError("ephemeral cannot be set if upload is set")
|
|
71
|
+
else:
|
|
72
|
+
ephemeral = False # if we excplicitly set upload=True, force ephemeral=False
|
|
70
73
|
|
|
71
74
|
# determine inline
|
|
72
75
|
if inline is None:
|
|
@@ -155,11 +158,11 @@ class FigpackView:
|
|
|
155
158
|
|
|
156
159
|
_save_figure(self, output_path, title=title)
|
|
157
160
|
|
|
158
|
-
def
|
|
161
|
+
def write_to_zarr_group(self, group: Group) -> None:
|
|
159
162
|
"""
|
|
160
163
|
Write the view data to a Zarr group. Must be implemented by subclasses.
|
|
161
164
|
|
|
162
165
|
Args:
|
|
163
166
|
group: Zarr group to write data into
|
|
164
167
|
"""
|
|
165
|
-
raise NotImplementedError("Subclasses must implement
|
|
168
|
+
raise NotImplementedError("Subclasses must implement write_to_zarr_group")
|