figpack 0.1.4__py3-none-any.whl → 0.1.5__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.

Files changed (34) hide show
  1. figpack/__init__.py +1 -5
  2. figpack/cli.py +8 -7
  3. figpack/core/_bundle_utils.py +2 -0
  4. figpack/core/_show_view.py +4 -8
  5. figpack/core/_upload_bundle.py +13 -11
  6. figpack/core/figpack_view.py +1 -0
  7. figpack/figpack-gui-dist/assets/{index-Dw14QqeQ.js → index-DeyVLaXh.js} +91 -91
  8. figpack/figpack-gui-dist/index.html +1 -1
  9. figpack/spike_sorting/views/AutocorrelogramItem.py +1 -0
  10. figpack/spike_sorting/views/Autocorrelograms.py +39 -9
  11. figpack/spike_sorting/views/CrossCorrelogramItem.py +1 -0
  12. figpack/spike_sorting/views/CrossCorrelograms.py +45 -7
  13. figpack/spike_sorting/views/UnitsTable.py +5 -3
  14. figpack/spike_sorting/views/UnitsTableRow.py +1 -1
  15. figpack/spike_sorting/views/__init__.py +2 -2
  16. figpack/views/Box.py +3 -1
  17. figpack/views/Image.py +4 -2
  18. figpack/views/LayoutItem.py +1 -0
  19. figpack/views/Markdown.py +1 -0
  20. figpack/views/MatplotlibFigure.py +4 -2
  21. figpack/views/MultiChannelTimeseries.py +226 -0
  22. figpack/views/PlotlyFigure.py +5 -3
  23. figpack/views/Splitter.py +3 -1
  24. figpack/views/TabLayout.py +3 -1
  25. figpack/views/TabLayoutItem.py +1 -0
  26. figpack/views/TimeseriesGraph.py +3 -2
  27. figpack/views/__init__.py +7 -6
  28. {figpack-0.1.4.dist-info → figpack-0.1.5.dist-info}/METADATA +48 -7
  29. figpack-0.1.5.dist-info/RECORD +39 -0
  30. figpack-0.1.4.dist-info/RECORD +0 -38
  31. {figpack-0.1.4.dist-info → figpack-0.1.5.dist-info}/WHEEL +0 -0
  32. {figpack-0.1.4.dist-info → figpack-0.1.5.dist-info}/entry_points.txt +0 -0
  33. {figpack-0.1.4.dist-info → figpack-0.1.5.dist-info}/licenses/LICENSE +0 -0
  34. {figpack-0.1.4.dist-info → figpack-0.1.5.dist-info}/top_level.txt +0 -0
figpack/__init__.py CHANGED
@@ -2,8 +2,4 @@
2
2
  figpack - A Python package for creating shareable, interactive visualizations in the browser
3
3
  """
4
4
 
5
- __version__ = "0.1.4"
6
- __author__ = "Jeremy Magland"
7
- __email__ = "jmagland@flatironinstitute.org"
8
-
9
- from . import spike_sorting
5
+ __version__ = "0.1.5"
figpack/cli.py CHANGED
@@ -3,19 +3,20 @@ Command-line interface for figpack
3
3
  """
4
4
 
5
5
  import argparse
6
- import sys
6
+ import json
7
7
  import pathlib
8
- import tempfile
8
+ import socket
9
+ import sys
9
10
  import tarfile
10
- import json
11
- import requests
11
+ import tempfile
12
12
  import threading
13
13
  import webbrowser
14
- import socket
15
14
  from concurrent.futures import ThreadPoolExecutor, as_completed
16
- from urllib.parse import urlparse, urljoin
17
- from typing import Dict, List, Tuple, Optional, Union
18
15
  from http.server import SimpleHTTPRequestHandler, ThreadingHTTPServer
16
+ from typing import Dict, List, Optional, Tuple, Union
17
+ from urllib.parse import urljoin, urlparse
18
+
19
+ import requests
19
20
 
20
21
  from . import __version__
21
22
  from .core._show_view import serve_files
@@ -1,6 +1,8 @@
1
1
  import os
2
2
  import pathlib
3
+
3
4
  import zarr
5
+
4
6
  from .figpack_view import FigpackView
5
7
 
6
8
  thisdir = pathlib.Path(__file__).parent.resolve()
@@ -1,18 +1,14 @@
1
1
  import os
2
-
3
- from typing import Union
4
- import tempfile
5
-
6
- import webbrowser
7
-
8
2
  import pathlib
9
-
3
+ import tempfile
10
4
  import threading
5
+ import webbrowser
11
6
  from http.server import SimpleHTTPRequestHandler, ThreadingHTTPServer
7
+ from typing import Union
12
8
 
13
- from .figpack_view import FigpackView
14
9
  from ._bundle_utils import prepare_figure_bundle
15
10
  from ._upload_bundle import _upload_bundle
11
+ from .figpack_view import FigpackView
16
12
 
17
13
  thisdir = pathlib.Path(__file__).parent.resolve()
18
14
 
@@ -1,18 +1,20 @@
1
- import time
1
+ import hashlib
2
2
  import json
3
- import uuid
4
3
  import pathlib
5
- import requests
6
4
  import threading
7
- import hashlib
8
- from .. import __version__
5
+ import time
6
+ import uuid
9
7
  from concurrent.futures import ThreadPoolExecutor, as_completed
10
8
  from datetime import datetime, timedelta, timezone
11
9
 
10
+ import requests
11
+
12
+ from .. import __version__
13
+
12
14
  thisdir = pathlib.Path(__file__).parent.resolve()
13
15
 
14
16
  FIGPACK_API_BASE_URL = "https://figpack-api.vercel.app"
15
- TEMPORY_BASE_URL = "https://tempory.net/figpack/default/figures"
17
+ FIGPACK_FIGURES_BASE_URL = "https://figures.figpack.org/figures/default"
16
18
 
17
19
 
18
20
  def _upload_single_file(
@@ -78,7 +80,7 @@ def _check_existing_figure(figure_id: str) -> dict:
78
80
  Returns:
79
81
  dict: Contains 'exists' (bool) and 'status' (str) if exists
80
82
  """
81
- figpack_url = f"{TEMPORY_BASE_URL}/{figure_id}/figpack.json"
83
+ figpack_url = f"{FIGPACK_FIGURES_BASE_URL}/{figure_id}/figpack.json"
82
84
 
83
85
  try:
84
86
  response = requests.get(figpack_url, timeout=10)
@@ -148,7 +150,7 @@ def _upload_bundle(tmpdir: str, passcode: str) -> None:
148
150
 
149
151
  # If figure_id is None, it means we found a completed upload and should skip
150
152
  if figure_id is None:
151
- figure_url = f"{TEMPORY_BASE_URL}/{completed_figure_id}/index.html"
153
+ figure_url = f"{FIGPACK_FIGURES_BASE_URL}/{completed_figure_id}/index.html"
152
154
  print(f"Figure already exists at: {figure_url}")
153
155
  return figure_url
154
156
 
@@ -281,7 +283,7 @@ def _upload_bundle(tmpdir: str, passcode: str) -> None:
281
283
  )
282
284
  print("Upload completed successfully")
283
285
 
284
- figure_url = f"{TEMPORY_BASE_URL}/{figure_id}/index.html"
286
+ figure_url = f"{FIGPACK_FIGURES_BASE_URL}/{figure_id}/index.html"
285
287
  return figure_url
286
288
 
287
289
 
@@ -352,7 +354,7 @@ def _upload_small_file(
352
354
  """
353
355
  Upload a small file by sending content directly
354
356
  """
355
- destination_url = f"{TEMPORY_BASE_URL}/{figure_id}/{file_path}"
357
+ destination_url = f"{FIGPACK_FIGURES_BASE_URL}/{figure_id}/{file_path}"
356
358
 
357
359
  try:
358
360
  content.encode("utf-8")
@@ -386,7 +388,7 @@ def _upload_large_file(
386
388
  """
387
389
  Upload a large file using signed URL
388
390
  """
389
- destination_url = f"{TEMPORY_BASE_URL}/{figure_id}/{file_path}"
391
+ destination_url = f"{FIGPACK_FIGURES_BASE_URL}/{figure_id}/{file_path}"
390
392
  file_size = local_file_path.stat().st_size
391
393
 
392
394
  # Get signed URL
@@ -49,6 +49,7 @@ class FigpackView:
49
49
  print(
50
50
  f"For development, run figpack-gui in dev mode and use http://localhost:5173?data=http://localhost:{port}/data.zarr"
51
51
  )
52
+ open_in_browser = False
52
53
 
53
54
  _show_view(
54
55
  self,