figpack 0.2.22__tar.gz → 0.2.24__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.

Files changed (73) hide show
  1. {figpack-0.2.22/figpack.egg-info → figpack-0.2.24}/PKG-INFO +2 -1
  2. {figpack-0.2.22 → figpack-0.2.24}/figpack/__init__.py +1 -1
  3. {figpack-0.2.22 → figpack-0.2.24}/figpack/core/figpack_view.py +23 -12
  4. figpack-0.2.22/figpack/figpack-figure-dist/assets/index-LugXZ9DB.js → figpack-0.2.24/figpack/figpack-figure-dist/assets/index-CLEO_r6_.js +27 -27
  5. {figpack-0.2.22 → figpack-0.2.24}/figpack/figpack-figure-dist/index.html +1 -1
  6. figpack-0.2.24/figpack/views/MountainLayout.py +72 -0
  7. figpack-0.2.24/figpack/views/MountainLayoutItem.py +50 -0
  8. {figpack-0.2.22 → figpack-0.2.24}/figpack/views/__init__.py +2 -0
  9. {figpack-0.2.22 → figpack-0.2.24/figpack.egg-info}/PKG-INFO +2 -1
  10. {figpack-0.2.22 → figpack-0.2.24}/figpack.egg-info/SOURCES.txt +3 -1
  11. {figpack-0.2.22 → figpack-0.2.24}/figpack.egg-info/requires.txt +1 -0
  12. {figpack-0.2.22 → figpack-0.2.24}/pyproject.toml +2 -1
  13. {figpack-0.2.22 → figpack-0.2.24}/LICENSE +0 -0
  14. {figpack-0.2.22 → figpack-0.2.24}/MANIFEST.in +0 -0
  15. {figpack-0.2.22 → figpack-0.2.24}/README.md +0 -0
  16. {figpack-0.2.22 → figpack-0.2.24}/figpack/cli.py +0 -0
  17. {figpack-0.2.22 → figpack-0.2.24}/figpack/core/__init__.py +0 -0
  18. {figpack-0.2.22 → figpack-0.2.24}/figpack/core/_bundle_utils.py +0 -0
  19. {figpack-0.2.22 → figpack-0.2.24}/figpack/core/_file_handler.py +0 -0
  20. {figpack-0.2.22 → figpack-0.2.24}/figpack/core/_save_figure.py +0 -0
  21. {figpack-0.2.22 → figpack-0.2.24}/figpack/core/_server_manager.py +0 -0
  22. {figpack-0.2.22 → figpack-0.2.24}/figpack/core/_show_view.py +0 -0
  23. {figpack-0.2.22 → figpack-0.2.24}/figpack/core/_upload_bundle.py +0 -0
  24. {figpack-0.2.22 → figpack-0.2.24}/figpack/core/_view_figure.py +0 -0
  25. {figpack-0.2.22 → figpack-0.2.24}/figpack/core/config.py +0 -0
  26. {figpack-0.2.22 → figpack-0.2.24}/figpack/core/extension_view.py +0 -0
  27. {figpack-0.2.22 → figpack-0.2.24}/figpack/core/figpack_extension.py +0 -0
  28. {figpack-0.2.22 → figpack-0.2.24}/figpack/core/zarr.py +0 -0
  29. {figpack-0.2.22 → figpack-0.2.24}/figpack/extensions.py +0 -0
  30. {figpack-0.2.22 → figpack-0.2.24}/figpack/figpack-figure-dist/assets/index-V5m_wCvw.css +0 -0
  31. {figpack-0.2.22 → figpack-0.2.24}/figpack/figpack-figure-dist/assets/neurosift-logo-CLsuwLMO.png +0 -0
  32. {figpack-0.2.22 → figpack-0.2.24}/figpack/views/Box.py +0 -0
  33. {figpack-0.2.22 → figpack-0.2.24}/figpack/views/DataFrame.py +0 -0
  34. {figpack-0.2.22 → figpack-0.2.24}/figpack/views/Gallery.py +0 -0
  35. {figpack-0.2.22 → figpack-0.2.24}/figpack/views/GalleryItem.py +0 -0
  36. {figpack-0.2.22 → figpack-0.2.24}/figpack/views/Image.py +0 -0
  37. {figpack-0.2.22 → figpack-0.2.24}/figpack/views/LayoutItem.py +0 -0
  38. {figpack-0.2.22 → figpack-0.2.24}/figpack/views/Markdown.py +0 -0
  39. {figpack-0.2.22 → figpack-0.2.24}/figpack/views/MatplotlibFigure.py +0 -0
  40. {figpack-0.2.22 → figpack-0.2.24}/figpack/views/MultiChannelTimeseries.py +0 -0
  41. {figpack-0.2.22 → figpack-0.2.24}/figpack/views/PlotlyExtension/PlotlyExtension.py +0 -0
  42. {figpack-0.2.22 → figpack-0.2.24}/figpack/views/PlotlyExtension/__init__.py +0 -0
  43. {figpack-0.2.22 → figpack-0.2.24}/figpack/views/PlotlyExtension/_plotly_extension.py +0 -0
  44. {figpack-0.2.22 → figpack-0.2.24}/figpack/views/PlotlyExtension/plotly_view.js +0 -0
  45. {figpack-0.2.22 → figpack-0.2.24}/figpack/views/Spectrogram.py +0 -0
  46. {figpack-0.2.22 → figpack-0.2.24}/figpack/views/Splitter.py +0 -0
  47. {figpack-0.2.22 → figpack-0.2.24}/figpack/views/TabLayout.py +0 -0
  48. {figpack-0.2.22 → figpack-0.2.24}/figpack/views/TabLayoutItem.py +0 -0
  49. {figpack-0.2.22 → figpack-0.2.24}/figpack/views/TimeseriesGraph.py +0 -0
  50. {figpack-0.2.22 → figpack-0.2.24}/figpack.egg-info/dependency_links.txt +0 -0
  51. {figpack-0.2.22 → figpack-0.2.24}/figpack.egg-info/entry_points.txt +0 -0
  52. {figpack-0.2.22 → figpack-0.2.24}/figpack.egg-info/top_level.txt +0 -0
  53. {figpack-0.2.22 → figpack-0.2.24}/setup.cfg +0 -0
  54. {figpack-0.2.22 → figpack-0.2.24}/tests/test_box.py +0 -0
  55. {figpack-0.2.22 → figpack-0.2.24}/tests/test_cli.py +0 -0
  56. {figpack-0.2.22 → figpack-0.2.24}/tests/test_core.py +0 -0
  57. {figpack-0.2.22 → figpack-0.2.24}/tests/test_dataframe.py +0 -0
  58. {figpack-0.2.22 → figpack-0.2.24}/tests/test_extension_system.py +0 -0
  59. {figpack-0.2.22 → figpack-0.2.24}/tests/test_figpack_view.py +0 -0
  60. {figpack-0.2.22 → figpack-0.2.24}/tests/test_file_handler.py +0 -0
  61. {figpack-0.2.22 → figpack-0.2.24}/tests/test_gallery.py +0 -0
  62. {figpack-0.2.22 → figpack-0.2.24}/tests/test_image.py +0 -0
  63. {figpack-0.2.22 → figpack-0.2.24}/tests/test_markdown.py +0 -0
  64. {figpack-0.2.22 → figpack-0.2.24}/tests/test_matplotlib_figure.py +0 -0
  65. {figpack-0.2.22 → figpack-0.2.24}/tests/test_multichannel_timeseries.py +0 -0
  66. {figpack-0.2.22 → figpack-0.2.24}/tests/test_plotly_figure.py +0 -0
  67. {figpack-0.2.22 → figpack-0.2.24}/tests/test_server_manager.py +0 -0
  68. {figpack-0.2.22 → figpack-0.2.24}/tests/test_spectrogram.py +0 -0
  69. {figpack-0.2.22 → figpack-0.2.24}/tests/test_splitter.py +0 -0
  70. {figpack-0.2.22 → figpack-0.2.24}/tests/test_tablayout.py +0 -0
  71. {figpack-0.2.22 → figpack-0.2.24}/tests/test_timeseries_graph.py +0 -0
  72. {figpack-0.2.22 → figpack-0.2.24}/tests/test_upload_bundle.py +0 -0
  73. {figpack-0.2.22 → figpack-0.2.24}/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.22
3
+ Version: 0.2.24
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
@@ -71,6 +71,7 @@ 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
73
  Requires-Dist: nibabel; extra == "docs"
74
+ Requires-Dist: Pillow; extra == "docs"
74
75
  Dynamic: license-file
75
76
 
76
77
  # figpack
@@ -2,7 +2,7 @@
2
2
  figpack - A Python package for creating shareable, interactive visualizations in the browser
3
3
  """
4
4
 
5
- __version__ = "0.2.22"
5
+ __version__ = "0.2.24"
6
6
 
7
7
  from .cli import view_figure
8
8
  from .core import FigpackView, FigpackExtension, ExtensionView
@@ -60,16 +60,23 @@ class FigpackView:
60
60
 
61
61
  # determine upload
62
62
  if upload is None:
63
- upload = os.environ.get("FIGPACK_UPLOAD") == "1"
64
- else:
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
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 _is_in_notebook():
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.")