figpack 0.2.5__tar.gz → 0.2.7__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 (84) hide show
  1. {figpack-0.2.5 → figpack-0.2.7}/MANIFEST.in +1 -1
  2. {figpack-0.2.5/figpack.egg-info → figpack-0.2.7}/PKG-INFO +2 -1
  3. {figpack-0.2.5 → figpack-0.2.7}/figpack/__init__.py +1 -1
  4. {figpack-0.2.5 → figpack-0.2.7}/figpack/core/_bundle_utils.py +2 -2
  5. {figpack-0.2.5 → figpack-0.2.7}/figpack/core/_save_figure.py +3 -3
  6. {figpack-0.2.5 → figpack-0.2.7}/figpack/core/_show_view.py +5 -1
  7. {figpack-0.2.5 → figpack-0.2.7}/figpack/core/_upload_bundle.py +17 -1
  8. {figpack-0.2.5 → figpack-0.2.7}/figpack/core/figpack_view.py +3 -3
  9. figpack-0.2.5/figpack/figpack-gui-dist/assets/index-CrYQmIda.js → figpack-0.2.7/figpack/figpack-figure-dist/assets/index-CTBd5_Gw.js +72 -71
  10. {figpack-0.2.5/figpack/figpack-gui-dist → figpack-0.2.7/figpack/figpack-figure-dist}/index.html +1 -1
  11. {figpack-0.2.5 → figpack-0.2.7}/figpack/spike_sorting/views/Autocorrelograms.py +29 -19
  12. {figpack-0.2.5 → figpack-0.2.7}/figpack/spike_sorting/views/CrossCorrelograms.py +29 -19
  13. {figpack-0.2.5 → figpack-0.2.7}/figpack/spike_sorting/views/UnitsTable.py +27 -8
  14. figpack-0.2.7/figpack/views/DataFrame.py +109 -0
  15. {figpack-0.2.5 → figpack-0.2.7}/figpack/views/Markdown.py +12 -2
  16. {figpack-0.2.5 → figpack-0.2.7}/figpack/views/MatplotlibFigure.py +26 -3
  17. {figpack-0.2.5 → figpack-0.2.7}/figpack/views/PlotlyFigure.py +18 -2
  18. {figpack-0.2.5 → figpack-0.2.7}/figpack/views/__init__.py +1 -0
  19. {figpack-0.2.5 → figpack-0.2.7/figpack.egg-info}/PKG-INFO +2 -1
  20. {figpack-0.2.5 → figpack-0.2.7}/figpack.egg-info/SOURCES.txt +6 -4
  21. {figpack-0.2.5 → figpack-0.2.7}/figpack.egg-info/requires.txt +1 -0
  22. {figpack-0.2.5 → figpack-0.2.7}/pyproject.toml +6 -5
  23. figpack-0.2.7/tests/test_dataframe.py +316 -0
  24. {figpack-0.2.5 → figpack-0.2.7}/tests/test_markdown.py +40 -3
  25. {figpack-0.2.5 → figpack-0.2.7}/tests/test_matplotlib_figure.py +34 -4
  26. {figpack-0.2.5 → figpack-0.2.7}/tests/test_plotly_figure.py +28 -6
  27. {figpack-0.2.5 → figpack-0.2.7}/tests/test_spike_sorting_correlograms.py +38 -11
  28. {figpack-0.2.5 → figpack-0.2.7}/tests/test_units_table.py +51 -14
  29. {figpack-0.2.5 → figpack-0.2.7}/tests/test_upload_bundle.py +3 -1
  30. {figpack-0.2.5 → figpack-0.2.7}/LICENSE +0 -0
  31. {figpack-0.2.5 → figpack-0.2.7}/README.md +0 -0
  32. {figpack-0.2.5 → figpack-0.2.7}/figpack/cli.py +0 -0
  33. {figpack-0.2.5 → figpack-0.2.7}/figpack/core/__init__.py +0 -0
  34. {figpack-0.2.5 → figpack-0.2.7}/figpack/core/_server_manager.py +0 -0
  35. {figpack-0.2.5 → figpack-0.2.7}/figpack/core/_view_figure.py +0 -0
  36. {figpack-0.2.5 → figpack-0.2.7}/figpack/core/config.py +0 -0
  37. {figpack-0.2.5/figpack/figpack-gui-dist → figpack-0.2.7/figpack/figpack-figure-dist}/assets/index-Cmae55E4.css +0 -0
  38. {figpack-0.2.5/figpack/figpack-gui-dist → figpack-0.2.7/figpack/figpack-figure-dist}/assets/neurosift-logo-CLsuwLMO.png +0 -0
  39. {figpack-0.2.5 → figpack-0.2.7}/figpack/franklab/__init__.py +0 -0
  40. {figpack-0.2.5 → figpack-0.2.7}/figpack/franklab/views/TrackAnimation.py +0 -0
  41. {figpack-0.2.5 → figpack-0.2.7}/figpack/franklab/views/__init__.py +0 -0
  42. {figpack-0.2.5 → figpack-0.2.7}/figpack/spike_sorting/__init__.py +0 -0
  43. {figpack-0.2.5 → figpack-0.2.7}/figpack/spike_sorting/views/AutocorrelogramItem.py +0 -0
  44. {figpack-0.2.5 → figpack-0.2.7}/figpack/spike_sorting/views/AverageWaveforms.py +0 -0
  45. {figpack-0.2.5 → figpack-0.2.7}/figpack/spike_sorting/views/CrossCorrelogramItem.py +0 -0
  46. {figpack-0.2.5 → figpack-0.2.7}/figpack/spike_sorting/views/RasterPlot.py +0 -0
  47. {figpack-0.2.5 → figpack-0.2.7}/figpack/spike_sorting/views/RasterPlotItem.py +0 -0
  48. {figpack-0.2.5 → figpack-0.2.7}/figpack/spike_sorting/views/SpikeAmplitudes.py +0 -0
  49. {figpack-0.2.5 → figpack-0.2.7}/figpack/spike_sorting/views/SpikeAmplitudesItem.py +0 -0
  50. {figpack-0.2.5 → figpack-0.2.7}/figpack/spike_sorting/views/UnitSimilarityScore.py +0 -0
  51. {figpack-0.2.5 → figpack-0.2.7}/figpack/spike_sorting/views/UnitsTableColumn.py +0 -0
  52. {figpack-0.2.5 → figpack-0.2.7}/figpack/spike_sorting/views/UnitsTableRow.py +0 -0
  53. {figpack-0.2.5 → figpack-0.2.7}/figpack/spike_sorting/views/__init__.py +0 -0
  54. {figpack-0.2.5 → figpack-0.2.7}/figpack/views/Box.py +0 -0
  55. {figpack-0.2.5 → figpack-0.2.7}/figpack/views/Gallery.py +0 -0
  56. {figpack-0.2.5 → figpack-0.2.7}/figpack/views/GalleryItem.py +0 -0
  57. {figpack-0.2.5 → figpack-0.2.7}/figpack/views/Image.py +0 -0
  58. {figpack-0.2.5 → figpack-0.2.7}/figpack/views/LayoutItem.py +0 -0
  59. {figpack-0.2.5 → figpack-0.2.7}/figpack/views/MultiChannelTimeseries.py +0 -0
  60. {figpack-0.2.5 → figpack-0.2.7}/figpack/views/Splitter.py +0 -0
  61. {figpack-0.2.5 → figpack-0.2.7}/figpack/views/TabLayout.py +0 -0
  62. {figpack-0.2.5 → figpack-0.2.7}/figpack/views/TabLayoutItem.py +0 -0
  63. {figpack-0.2.5 → figpack-0.2.7}/figpack/views/TimeseriesGraph.py +0 -0
  64. {figpack-0.2.5 → figpack-0.2.7}/figpack.egg-info/dependency_links.txt +0 -0
  65. {figpack-0.2.5 → figpack-0.2.7}/figpack.egg-info/entry_points.txt +0 -0
  66. {figpack-0.2.5 → figpack-0.2.7}/figpack.egg-info/top_level.txt +0 -0
  67. {figpack-0.2.5 → figpack-0.2.7}/setup.cfg +0 -0
  68. {figpack-0.2.5 → figpack-0.2.7}/tests/test_average_waveforms.py +0 -0
  69. {figpack-0.2.5 → figpack-0.2.7}/tests/test_box.py +0 -0
  70. {figpack-0.2.5 → figpack-0.2.7}/tests/test_cli.py +0 -0
  71. {figpack-0.2.5 → figpack-0.2.7}/tests/test_core.py +0 -0
  72. {figpack-0.2.5 → figpack-0.2.7}/tests/test_figpack_view.py +0 -0
  73. {figpack-0.2.5 → figpack-0.2.7}/tests/test_gallery.py +0 -0
  74. {figpack-0.2.5 → figpack-0.2.7}/tests/test_image.py +0 -0
  75. {figpack-0.2.5 → figpack-0.2.7}/tests/test_multichannel_timeseries.py +0 -0
  76. {figpack-0.2.5 → figpack-0.2.7}/tests/test_raster_plot.py +0 -0
  77. {figpack-0.2.5 → figpack-0.2.7}/tests/test_server_manager.py +0 -0
  78. {figpack-0.2.5 → figpack-0.2.7}/tests/test_show_view.py +0 -0
  79. {figpack-0.2.5 → figpack-0.2.7}/tests/test_spike_amplitudes.py +0 -0
  80. {figpack-0.2.5 → figpack-0.2.7}/tests/test_splitter.py +0 -0
  81. {figpack-0.2.5 → figpack-0.2.7}/tests/test_tablayout.py +0 -0
  82. {figpack-0.2.5 → figpack-0.2.7}/tests/test_timeseries_graph.py +0 -0
  83. {figpack-0.2.5 → figpack-0.2.7}/tests/test_track_animation.py +0 -0
  84. {figpack-0.2.5 → figpack-0.2.7}/tests/test_view_figure.py +0 -0
@@ -2,7 +2,7 @@ include README.md
2
2
  include LICENSE
3
3
  include pyproject.toml
4
4
  recursive-include figpack *.py
5
- recursive-include figpack/figpack-gui-dist *
5
+ recursive-include figpack/figpack-figure-dist *
6
6
  global-exclude __pycache__
7
7
  global-exclude *.py[co]
8
8
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: figpack
3
- Version: 0.2.5
3
+ Version: 0.2.7
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
@@ -36,6 +36,7 @@ Requires-Dist: spikeinterface; extra == "test"
36
36
  Requires-Dist: matplotlib; extra == "test"
37
37
  Requires-Dist: plotly; extra == "test"
38
38
  Requires-Dist: Pillow; extra == "test"
39
+ Requires-Dist: pandas; extra == "test"
39
40
  Provides-Extra: dev
40
41
  Requires-Dist: pytest>=7.0; extra == "dev"
41
42
  Requires-Dist: pytest-cov>=4.0; extra == "dev"
@@ -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.5"
5
+ __version__ = "0.2.7"
6
6
 
7
7
  from .cli import view_figure
8
8
 
@@ -15,7 +15,7 @@ def prepare_figure_bundle(
15
15
  Prepare a figure bundle in the specified temporary directory.
16
16
 
17
17
  This function:
18
- 1. Copies all files from the figpack-gui-dist directory to tmpdir
18
+ 1. Copies all files from the figpack-figure-dist directory to tmpdir
19
19
  2. Writes the view data to a zarr group
20
20
  3. Consolidates zarr metadata
21
21
 
@@ -25,7 +25,7 @@ def prepare_figure_bundle(
25
25
  title: Title for the figure (required)
26
26
  description: Optional description for the figure (markdown supported)
27
27
  """
28
- html_dir = thisdir / ".." / "figpack-gui-dist"
28
+ html_dir = thisdir / ".." / "figpack-figure-dist"
29
29
  if not os.path.exists(html_dir):
30
30
  raise SystemExit(f"Error: directory not found: {html_dir}")
31
31
 
@@ -5,7 +5,7 @@ from ._bundle_utils import prepare_figure_bundle
5
5
  from .figpack_view import FigpackView
6
6
 
7
7
 
8
- def _save_figure(view: FigpackView, output_path: str):
8
+ def _save_figure(view: FigpackView, output_path: str, *, title: str):
9
9
  """
10
10
  Save the figure to a folder or a .tar.gz file
11
11
 
@@ -19,7 +19,7 @@ def _save_figure(view: FigpackView, output_path: str):
19
19
  ):
20
20
  # It's a .tar.gz file
21
21
  with tempfile.TemporaryDirectory(prefix="figpack_save_") as tmpdir:
22
- prepare_figure_bundle(view, tmpdir)
22
+ prepare_figure_bundle(view, tmpdir, title=title)
23
23
  # Create tar.gz file
24
24
  import tarfile
25
25
 
@@ -28,4 +28,4 @@ def _save_figure(view: FigpackView, output_path: str):
28
28
  else:
29
29
  # It's a folder
30
30
  output_path.mkdir(parents=True, exist_ok=True)
31
- prepare_figure_bundle(view, str(output_path))
31
+ prepare_figure_bundle(view, str(output_path), title=title)
@@ -110,7 +110,11 @@ def _show_view(
110
110
 
111
111
  # Upload the bundle
112
112
  figure_url = _upload_bundle(
113
- tmpdir, api_key, title=title, ephemeral=ephemeral
113
+ tmpdir,
114
+ api_key,
115
+ title=title,
116
+ ephemeral=ephemeral,
117
+ use_consolidated_metadata_only=True,
114
118
  )
115
119
 
116
120
  if inline:
@@ -253,10 +253,22 @@ def _finalize_figure(figure_url: str, api_key: str) -> dict:
253
253
 
254
254
 
255
255
  def _upload_bundle(
256
- tmpdir: str, api_key: str, title: str = None, ephemeral: bool = False
256
+ tmpdir: str,
257
+ api_key: str,
258
+ title: str = None,
259
+ ephemeral: bool = False,
260
+ use_consolidated_metadata_only: bool = False,
257
261
  ) -> str:
258
262
  """
259
263
  Upload the prepared bundle to the cloud using the new database-driven approach
264
+
265
+ Args:
266
+ tmpdir: Path to the temporary directory containing the bundle
267
+ api_key: API key for authentication
268
+ title: Optional title for the figure
269
+ ephemeral: Whether to create an ephemeral figure
270
+ use_consolidated_metadata_only: If True, excludes individual zarr metadata files
271
+ (.zgroup, .zarray, .zattrs) since they are included in .zmetadata
260
272
  """
261
273
  tmpdir_path = pathlib.Path(tmpdir)
262
274
 
@@ -268,6 +280,10 @@ def _upload_bundle(
268
280
  for file_path in tmpdir_path.rglob("*"):
269
281
  if file_path.is_file():
270
282
  relative_path = file_path.relative_to(tmpdir_path)
283
+ # Skip individual zarr metadata files if using consolidated metadata only
284
+ if use_consolidated_metadata_only:
285
+ if str(relative_path).endswith((".zgroup", ".zarray", ".zattrs")):
286
+ continue
271
287
  all_files.append((str(relative_path), file_path))
272
288
 
273
289
  # Calculate total files and size for metadata
@@ -121,7 +121,7 @@ class FigpackView:
121
121
  )
122
122
  print("** Development mode **")
123
123
  print(
124
- f"For development, run figpack-gui in dev mode and use http://localhost:5173?data=http://localhost:{port}/{_local_figure_name}/data.zarr"
124
+ f"For development, run figpack-figure in dev mode and use http://localhost:5173?data=http://localhost:{port}/{_local_figure_name}/data.zarr"
125
125
  )
126
126
  print("")
127
127
 
@@ -140,7 +140,7 @@ class FigpackView:
140
140
  _local_figure_name=_local_figure_name if _dev else None,
141
141
  )
142
142
 
143
- def save(self, output_path: str) -> None:
143
+ def save(self, output_path: str, *, title: str) -> None:
144
144
  """
145
145
  Save as figure either to a folder or to a .tar.gz file
146
146
  Args:
@@ -148,7 +148,7 @@ class FigpackView:
148
148
  """
149
149
  from ._save_figure import _save_figure
150
150
 
151
- _save_figure(self, output_path)
151
+ _save_figure(self, output_path, title=title)
152
152
 
153
153
  def _write_to_zarr_group(self, group: zarr.Group) -> None:
154
154
  """