figpack 0.2.30__py3-none-any.whl → 0.2.32__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 figpack might be problematic. Click here for more details.
- figpack/__init__.py +1 -1
- figpack/core/_save_figure.py +7 -3
- figpack/core/figpack_view.py +2 -2
- figpack/figpack-figure-dist/assets/index-Cit4NsSL.js +95 -0
- figpack/figpack-figure-dist/index.html +1 -1
- figpack/views/TimeseriesGraph.py +1 -1
- {figpack-0.2.30.dist-info → figpack-0.2.32.dist-info}/METADATA +1 -1
- {figpack-0.2.30.dist-info → figpack-0.2.32.dist-info}/RECORD +12 -12
- figpack/figpack-figure-dist/assets/index-CSkROe6e.js +0 -392
- {figpack-0.2.30.dist-info → figpack-0.2.32.dist-info}/WHEEL +0 -0
- {figpack-0.2.30.dist-info → figpack-0.2.32.dist-info}/entry_points.txt +0 -0
- {figpack-0.2.30.dist-info → figpack-0.2.32.dist-info}/licenses/LICENSE +0 -0
- {figpack-0.2.30.dist-info → figpack-0.2.32.dist-info}/top_level.txt +0 -0
figpack/__init__.py
CHANGED
figpack/core/_save_figure.py
CHANGED
|
@@ -5,7 +5,9 @@ from ._bundle_utils import prepare_figure_bundle
|
|
|
5
5
|
from .figpack_view import FigpackView
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
def _save_figure(
|
|
8
|
+
def _save_figure(
|
|
9
|
+
view: FigpackView, output_path: str, *, title: str, description: str = ""
|
|
10
|
+
) -> None:
|
|
9
11
|
"""
|
|
10
12
|
Save the figure to a folder or a .tar.gz file
|
|
11
13
|
|
|
@@ -19,7 +21,7 @@ def _save_figure(view: FigpackView, output_path: str, *, title: str):
|
|
|
19
21
|
):
|
|
20
22
|
# It's a .tar.gz file
|
|
21
23
|
with tempfile.TemporaryDirectory(prefix="figpack_save_") as tmpdir:
|
|
22
|
-
prepare_figure_bundle(view, tmpdir, title=title)
|
|
24
|
+
prepare_figure_bundle(view, tmpdir, title=title, description=description)
|
|
23
25
|
# Create tar.gz file
|
|
24
26
|
import tarfile
|
|
25
27
|
|
|
@@ -28,4 +30,6 @@ def _save_figure(view: FigpackView, output_path: str, *, title: str):
|
|
|
28
30
|
else:
|
|
29
31
|
# It's a folder
|
|
30
32
|
output_path.mkdir(parents=True, exist_ok=True)
|
|
31
|
-
prepare_figure_bundle(
|
|
33
|
+
prepare_figure_bundle(
|
|
34
|
+
view, str(output_path), title=title, description=description
|
|
35
|
+
)
|
figpack/core/figpack_view.py
CHANGED
|
@@ -166,7 +166,7 @@ class FigpackView:
|
|
|
166
166
|
_local_figure_name=_local_figure_name if _dev else None,
|
|
167
167
|
)
|
|
168
168
|
|
|
169
|
-
def save(self, output_path: str, *, title: str) -> None:
|
|
169
|
+
def save(self, output_path: str, *, title: str, description: str = "") -> None:
|
|
170
170
|
"""
|
|
171
171
|
Save as figure either to a folder or to a .tar.gz file
|
|
172
172
|
Args:
|
|
@@ -174,7 +174,7 @@ class FigpackView:
|
|
|
174
174
|
"""
|
|
175
175
|
from ._save_figure import _save_figure
|
|
176
176
|
|
|
177
|
-
_save_figure(self, output_path, title=title)
|
|
177
|
+
_save_figure(self, output_path, title=title, description=description)
|
|
178
178
|
|
|
179
179
|
def write_to_zarr_group(self, group: Group) -> None:
|
|
180
180
|
"""
|