figpack 0.1.6__tar.gz → 0.1.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 (63) hide show
  1. {figpack-0.1.6/figpack.egg-info → figpack-0.1.7}/PKG-INFO +1 -1
  2. {figpack-0.1.6 → figpack-0.1.7}/figpack/__init__.py +1 -1
  3. {figpack-0.1.6 → figpack-0.1.7}/figpack/core/_show_view.py +1 -1
  4. {figpack-0.1.6 → figpack-0.1.7}/figpack/core/_upload_bundle.py +18 -3
  5. figpack-0.1.7/figpack/core/config.py +5 -0
  6. {figpack-0.1.6 → figpack-0.1.7/figpack.egg-info}/PKG-INFO +1 -1
  7. {figpack-0.1.6 → figpack-0.1.7}/pyproject.toml +1 -1
  8. figpack-0.1.6/figpack/core/config.py +0 -1
  9. {figpack-0.1.6 → figpack-0.1.7}/LICENSE +0 -0
  10. {figpack-0.1.6 → figpack-0.1.7}/MANIFEST.in +0 -0
  11. {figpack-0.1.6 → figpack-0.1.7}/README.md +0 -0
  12. {figpack-0.1.6 → figpack-0.1.7}/figpack/cli.py +0 -0
  13. {figpack-0.1.6 → figpack-0.1.7}/figpack/core/__init__.py +0 -0
  14. {figpack-0.1.6 → figpack-0.1.7}/figpack/core/_bundle_utils.py +0 -0
  15. {figpack-0.1.6 → figpack-0.1.7}/figpack/core/figpack_view.py +0 -0
  16. {figpack-0.1.6 → figpack-0.1.7}/figpack/figpack-gui-dist/assets/index-BDa2iJW9.css +0 -0
  17. {figpack-0.1.6 → figpack-0.1.7}/figpack/figpack-gui-dist/assets/index-DaeClgi6.js +0 -0
  18. {figpack-0.1.6 → figpack-0.1.7}/figpack/figpack-gui-dist/assets/neurosift-logo-CLsuwLMO.png +0 -0
  19. {figpack-0.1.6 → figpack-0.1.7}/figpack/figpack-gui-dist/index.html +0 -0
  20. {figpack-0.1.6 → figpack-0.1.7}/figpack/spike_sorting/__init__.py +0 -0
  21. {figpack-0.1.6 → figpack-0.1.7}/figpack/spike_sorting/views/AutocorrelogramItem.py +0 -0
  22. {figpack-0.1.6 → figpack-0.1.7}/figpack/spike_sorting/views/Autocorrelograms.py +0 -0
  23. {figpack-0.1.6 → figpack-0.1.7}/figpack/spike_sorting/views/CrossCorrelogramItem.py +0 -0
  24. {figpack-0.1.6 → figpack-0.1.7}/figpack/spike_sorting/views/CrossCorrelograms.py +0 -0
  25. {figpack-0.1.6 → figpack-0.1.7}/figpack/spike_sorting/views/UnitSimilarityScore.py +0 -0
  26. {figpack-0.1.6 → figpack-0.1.7}/figpack/spike_sorting/views/UnitsTable.py +0 -0
  27. {figpack-0.1.6 → figpack-0.1.7}/figpack/spike_sorting/views/UnitsTableColumn.py +0 -0
  28. {figpack-0.1.6 → figpack-0.1.7}/figpack/spike_sorting/views/UnitsTableRow.py +0 -0
  29. {figpack-0.1.6 → figpack-0.1.7}/figpack/spike_sorting/views/__init__.py +0 -0
  30. {figpack-0.1.6 → figpack-0.1.7}/figpack/views/Box.py +0 -0
  31. {figpack-0.1.6 → figpack-0.1.7}/figpack/views/Image.py +0 -0
  32. {figpack-0.1.6 → figpack-0.1.7}/figpack/views/LayoutItem.py +0 -0
  33. {figpack-0.1.6 → figpack-0.1.7}/figpack/views/Markdown.py +0 -0
  34. {figpack-0.1.6 → figpack-0.1.7}/figpack/views/MatplotlibFigure.py +0 -0
  35. {figpack-0.1.6 → figpack-0.1.7}/figpack/views/MultiChannelTimeseries.py +0 -0
  36. {figpack-0.1.6 → figpack-0.1.7}/figpack/views/PlotlyFigure.py +0 -0
  37. {figpack-0.1.6 → figpack-0.1.7}/figpack/views/Splitter.py +0 -0
  38. {figpack-0.1.6 → figpack-0.1.7}/figpack/views/TabLayout.py +0 -0
  39. {figpack-0.1.6 → figpack-0.1.7}/figpack/views/TabLayoutItem.py +0 -0
  40. {figpack-0.1.6 → figpack-0.1.7}/figpack/views/TimeseriesGraph.py +0 -0
  41. {figpack-0.1.6 → figpack-0.1.7}/figpack/views/__init__.py +0 -0
  42. {figpack-0.1.6 → figpack-0.1.7}/figpack.egg-info/SOURCES.txt +0 -0
  43. {figpack-0.1.6 → figpack-0.1.7}/figpack.egg-info/dependency_links.txt +0 -0
  44. {figpack-0.1.6 → figpack-0.1.7}/figpack.egg-info/entry_points.txt +0 -0
  45. {figpack-0.1.6 → figpack-0.1.7}/figpack.egg-info/requires.txt +0 -0
  46. {figpack-0.1.6 → figpack-0.1.7}/figpack.egg-info/top_level.txt +0 -0
  47. {figpack-0.1.6 → figpack-0.1.7}/setup.cfg +0 -0
  48. {figpack-0.1.6 → figpack-0.1.7}/tests/test_box.py +0 -0
  49. {figpack-0.1.6 → figpack-0.1.7}/tests/test_cli.py +0 -0
  50. {figpack-0.1.6 → figpack-0.1.7}/tests/test_core.py +0 -0
  51. {figpack-0.1.6 → figpack-0.1.7}/tests/test_figpack_view.py +0 -0
  52. {figpack-0.1.6 → figpack-0.1.7}/tests/test_image.py +0 -0
  53. {figpack-0.1.6 → figpack-0.1.7}/tests/test_markdown.py +0 -0
  54. {figpack-0.1.6 → figpack-0.1.7}/tests/test_matplotlib_figure.py +0 -0
  55. {figpack-0.1.6 → figpack-0.1.7}/tests/test_multichannel_timeseries.py +0 -0
  56. {figpack-0.1.6 → figpack-0.1.7}/tests/test_plotly_figure.py +0 -0
  57. {figpack-0.1.6 → figpack-0.1.7}/tests/test_show_view.py +0 -0
  58. {figpack-0.1.6 → figpack-0.1.7}/tests/test_spike_sorting_correlograms.py +0 -0
  59. {figpack-0.1.6 → figpack-0.1.7}/tests/test_splitter.py +0 -0
  60. {figpack-0.1.6 → figpack-0.1.7}/tests/test_tablayout.py +0 -0
  61. {figpack-0.1.6 → figpack-0.1.7}/tests/test_timeseries_graph.py +0 -0
  62. {figpack-0.1.6 → figpack-0.1.7}/tests/test_units_table.py +0 -0
  63. {figpack-0.1.6 → figpack-0.1.7}/tests/test_upload_bundle.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: figpack
3
- Version: 0.1.6
3
+ Version: 0.1.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
@@ -2,4 +2,4 @@
2
2
  figpack - A Python package for creating shareable, interactive visualizations in the browser
3
3
  """
4
4
 
5
- __version__ = "0.1.6"
5
+ __version__ = "0.1.7"
@@ -36,7 +36,7 @@ def _show_view(
36
36
 
37
37
  # Upload the bundle
38
38
  print("Starting upload...")
39
- figure_url = _upload_bundle(tmpdir, api_key)
39
+ figure_url = _upload_bundle(tmpdir, api_key, title=title)
40
40
 
41
41
  if open_in_browser:
42
42
  webbrowser.open(figure_url)
@@ -106,11 +106,22 @@ def _compute_deterministic_figure_hash(tmpdir_path: pathlib.Path) -> str:
106
106
 
107
107
 
108
108
  def _create_or_get_figure(
109
- figure_hash: str, api_key: str, total_files: int = None, total_size: int = None
109
+ figure_hash: str,
110
+ api_key: str,
111
+ total_files: int = None,
112
+ total_size: int = None,
113
+ title: str = None,
110
114
  ) -> dict:
111
115
  """
112
116
  Create a new figure or get existing figure information
113
117
 
118
+ Args:
119
+ figure_hash: The hash of the figure
120
+ api_key: The API key for authentication
121
+ total_files: Optional total number of files
122
+ total_size: Optional total size of files
123
+ title: Optional title for the figure
124
+
114
125
  Returns:
115
126
  dict: Figure information from the API
116
127
  """
@@ -124,6 +135,8 @@ def _create_or_get_figure(
124
135
  payload["totalFiles"] = total_files
125
136
  if total_size is not None:
126
137
  payload["totalSize"] = total_size
138
+ if title is not None:
139
+ payload["title"] = title
127
140
 
128
141
  response = requests.post(f"{FIGPACK_API_BASE_URL}/api/figures/create", json=payload)
129
142
 
@@ -177,7 +190,7 @@ def _finalize_figure(figure_url: str, api_key: str) -> dict:
177
190
  return response_data
178
191
 
179
192
 
180
- def _upload_bundle(tmpdir: str, api_key: str) -> str:
193
+ def _upload_bundle(tmpdir: str, api_key: str, title: str = None) -> str:
181
194
  """
182
195
  Upload the prepared bundle to the cloud using the new database-driven approach
183
196
  """
@@ -203,7 +216,9 @@ def _upload_bundle(tmpdir: str, api_key: str) -> str:
203
216
  )
204
217
 
205
218
  # Find available figure ID and create/get figure in database with metadata
206
- result = _create_or_get_figure(figure_hash, api_key, total_files, total_size)
219
+ result = _create_or_get_figure(
220
+ figure_hash, api_key, total_files, total_size, title=title
221
+ )
207
222
  figure_info = result.get("figure", {})
208
223
  figure_url = figure_info.get("figureUrl")
209
224
 
@@ -0,0 +1,5 @@
1
+ import os
2
+
3
+ FIGPACK_API_BASE_URL = os.getenv(
4
+ "FIGPACK_API_BASE_URL", "https://figpack-api.vercel.app"
5
+ )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: figpack
3
- Version: 0.1.6
3
+ Version: 0.1.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
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "figpack"
7
- version = "0.1.6"
7
+ version = "0.1.7"
8
8
  description = "A Python package for creating shareable, interactive visualizations in the browser"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.8"
@@ -1 +0,0 @@
1
- FIGPACK_API_BASE_URL = "https://figpack-api.vercel.app"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes