figpack 0.2.23__py3-none-any.whl → 0.2.24__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/figpack_view.py +23 -12
- {figpack-0.2.23.dist-info → figpack-0.2.24.dist-info}/METADATA +1 -1
- {figpack-0.2.23.dist-info → figpack-0.2.24.dist-info}/RECORD +8 -8
- {figpack-0.2.23.dist-info → figpack-0.2.24.dist-info}/WHEEL +0 -0
- {figpack-0.2.23.dist-info → figpack-0.2.24.dist-info}/entry_points.txt +0 -0
- {figpack-0.2.23.dist-info → figpack-0.2.24.dist-info}/licenses/LICENSE +0 -0
- {figpack-0.2.23.dist-info → figpack-0.2.24.dist-info}/top_level.txt +0 -0
figpack/__init__.py
CHANGED
figpack/core/figpack_view.py
CHANGED
|
@@ -60,16 +60,23 @@ class FigpackView:
|
|
|
60
60
|
|
|
61
61
|
# determine upload
|
|
62
62
|
if upload is None:
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
63
|
+
if os.environ.get("FIGPACK_UPLOAD") == "1":
|
|
64
|
+
upload = True
|
|
65
|
+
elif os.environ.get("FIGPACK_UPLOAD") == "0":
|
|
66
|
+
upload = False
|
|
67
|
+
|
|
68
|
+
if upload is True:
|
|
69
|
+
if ephemeral is True:
|
|
70
|
+
# ephemeral is reserved for the case where we don't specify upload
|
|
71
|
+
# and we are in a notebook in a remote environment such as
|
|
72
|
+
# colab or jupyterhub
|
|
73
|
+
raise ValueError(
|
|
74
|
+
"ephemeral cannot be set to True if upload is set to True"
|
|
75
|
+
)
|
|
76
|
+
else:
|
|
77
|
+
ephemeral = (
|
|
78
|
+
False # if we excplicitly set upload=True, force ephemeral=False
|
|
79
|
+
)
|
|
73
80
|
|
|
74
81
|
# determine inline
|
|
75
82
|
if inline is None:
|
|
@@ -85,9 +92,13 @@ class FigpackView:
|
|
|
85
92
|
open_in_browser = os.environ.get("FIGPACK_OPEN_IN_BROWSER") == "1"
|
|
86
93
|
|
|
87
94
|
# determine ephemeral
|
|
88
|
-
if ephemeral is None:
|
|
95
|
+
if ephemeral is None and not upload:
|
|
89
96
|
ephemeral = False # default to False
|
|
90
|
-
if
|
|
97
|
+
if os.environ.get("FIGPACK_REMOTE_ENV") == "1":
|
|
98
|
+
ephemeral = True
|
|
99
|
+
elif os.environ.get("FIGPACK_REMOTE_ENV") == "0":
|
|
100
|
+
ephemeral = False
|
|
101
|
+
elif _is_in_notebook():
|
|
91
102
|
if _is_in_colab():
|
|
92
103
|
# if we are in a notebook and in colab, we should show as uploaded ephemeral
|
|
93
104
|
print("Detected Google Colab notebook environment.")
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
figpack/__init__.py,sha256=
|
|
1
|
+
figpack/__init__.py,sha256=BSk_FaHNj0h1MzM1DM9MwUKg45eS2qcYJqhWG6p6fLA,358
|
|
2
2
|
figpack/cli.py,sha256=s1mGQuFSntxiIvU6OWwHVlM9Cj-l1zMQ3OzFFe1-5ZE,11089
|
|
3
3
|
figpack/extensions.py,sha256=mILB4_F1RHkca4I7t88zh74IX8VCmfT7XFZZT4XYdNw,13009
|
|
4
4
|
figpack/core/__init__.py,sha256=7zU6O1piTk07aeCfbU81QqTgSHIO2n5MZ4LFNmsrtfs,192
|
|
@@ -12,7 +12,7 @@ figpack/core/_view_figure.py,sha256=GYTgSCWBxi1pR16aBgAYRcEuFcgj0vjsrLIVfy1HYzM,
|
|
|
12
12
|
figpack/core/config.py,sha256=oOR7SlP192vuFhYlS-h14HnG-kd_3gaz0vshXch2RNc,173
|
|
13
13
|
figpack/core/extension_view.py,sha256=FSBXdhFEWicLi0jhkuRdS-a8CNsULrEqqIKtYfV3tmI,1255
|
|
14
14
|
figpack/core/figpack_extension.py,sha256=KSJKlnLYueFnGa8QFMpbIF3CDMwnIZJOqsI0smz6cUc,2252
|
|
15
|
-
figpack/core/figpack_view.py,sha256=
|
|
15
|
+
figpack/core/figpack_view.py,sha256=1yDRvf2sCrdqWvIyWdJqL2yfLe1V7sAu1AMSE-ACdIE,6823
|
|
16
16
|
figpack/core/zarr.py,sha256=LTWOIX6vuH25STYTQS9_apfnfYXmATAEQkil3z9eYKE,1634
|
|
17
17
|
figpack/figpack-figure-dist/index.html,sha256=1_rZQVk_M3zMcSb6VmiqSyH3yqHiirvOw5XDNE-gJDQ,688
|
|
18
18
|
figpack/figpack-figure-dist/assets/index-CLEO_r6_.js,sha256=4qrioRNRLnfC3Kd0coraHxna05w3sK5lHnebHWv26a0,1108269
|
|
@@ -39,9 +39,9 @@ figpack/views/PlotlyExtension/PlotlyExtension.py,sha256=LOFSqbm46UZ7HsHTDxUPnNB3
|
|
|
39
39
|
figpack/views/PlotlyExtension/__init__.py,sha256=80Wy1mDMWyagjuR99ECxJePIYpRQ6TSyHkB0uZoBZ_0,70
|
|
40
40
|
figpack/views/PlotlyExtension/_plotly_extension.py,sha256=yZjG1NMGlQedeeLdV6TQWpi_NTm5Wfk5eWbXEdZbbFE,1455
|
|
41
41
|
figpack/views/PlotlyExtension/plotly_view.js,sha256=9BjgOPkqGl87SSonnb48nFeQV3UTIi1trpSPxd9qlKo,3055
|
|
42
|
-
figpack-0.2.
|
|
43
|
-
figpack-0.2.
|
|
44
|
-
figpack-0.2.
|
|
45
|
-
figpack-0.2.
|
|
46
|
-
figpack-0.2.
|
|
47
|
-
figpack-0.2.
|
|
42
|
+
figpack-0.2.24.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
43
|
+
figpack-0.2.24.dist-info/METADATA,sha256=9iUGa1111yAqK0_mHS_CfZde0X-4mxYEA0tsBSKBomU,4618
|
|
44
|
+
figpack-0.2.24.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
45
|
+
figpack-0.2.24.dist-info/entry_points.txt,sha256=l6d3siH2LxXa8qJGbjAqpIZtI5AkMSyDeoRDCzdrUto,45
|
|
46
|
+
figpack-0.2.24.dist-info/top_level.txt,sha256=lMKGaC5xWmAYBx9Ac1iMokm42KFnJFjmkP2ldyvOo-c,8
|
|
47
|
+
figpack-0.2.24.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|