figpack 0.2.10__py3-none-any.whl → 0.2.12__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 CHANGED
@@ -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.10"
5
+ __version__ = "0.2.12"
6
6
 
7
7
  from .cli import view_figure
8
8
  from .core import FigpackView, FigpackExtension, ExtensionRegistry, ExtensionView
@@ -30,6 +30,7 @@ class ExtensionView(FigpackView):
30
30
  f"Extension '{extension_name}' is not registered. "
31
31
  f"Make sure to register the extension before creating views that use it."
32
32
  )
33
+ self.extension = extension
33
34
 
34
35
  def _write_to_zarr_group(self, group: zarr.Group) -> None:
35
36
  """
@@ -46,6 +47,11 @@ class ExtensionView(FigpackView):
46
47
  # Store the extension name so the frontend knows which extension to use
47
48
  group.attrs["extension_name"] = self.extension_name
48
49
 
50
+ # Store additional script names
51
+ group.attrs["additional_script_names"] = list(
52
+ self.extension.get_additional_filenames().keys()
53
+ )
54
+
49
55
  # Store extension metadata for debugging/compatibility
50
56
  registry = ExtensionRegistry.get_instance()
51
57
  extension = registry.get_extension(self.extension_name)
@@ -70,7 +70,12 @@ class FigpackView:
70
70
 
71
71
  # determine inline
72
72
  if inline is None:
73
- inline = _is_in_notebook() or os.environ.get("FIGPACK_INLINE") == "1"
73
+ if os.environ.get("FIGPACK_INLINE") == "1":
74
+ inline = True
75
+ elif os.environ.get("FIGPACK_INLINE") == "0":
76
+ inline = False
77
+ elif _is_in_notebook() and not upload:
78
+ inline = True
74
79
 
75
80
  # determine open_in_browser
76
81
  if open_in_browser is None: