cubevis 1.0.36__py3-none-any.whl → 1.0.37__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.
cubevis/__version__.py CHANGED
@@ -1 +1 @@
1
- __version__ = '1.0.36'
1
+ __version__ = '1.0.37'
@@ -90,17 +90,33 @@ class DataPipe(DataSource,BokehInit):
90
90
  """Expose the WebSocket port through Colab's proxy"""
91
91
  try:
92
92
  from google.colab import output
93
+ import os
93
94
  port = self.address[1]
94
95
 
95
- # Use serve_kernel_port_as_iframe for newer Colab
96
- # This doesn't open a popup, just registers the port
97
- try:
98
- output.serve_kernel_port_as_iframe(port)
99
- print(f"✓ Colab: Exposed WebSocket port {port} via iframe proxy")
100
- except AttributeError:
101
- # Fallback to older method
102
- output.serve_kernel_port_as_window(port)
103
- print(f"✓ Colab: Exposed WebSocket port {port} via window proxy")
96
+ # Expose the port
97
+ output.serve_kernel_port_as_iframe(port)
98
+
99
+ # Get the kernel domain and inject it into JavaScript
100
+ # Colab sets environment variables we can use
101
+ kernel_id = os.environ.get('COLAB_KERNEL_ID', '')
102
+
103
+ # Inject the kernel WebSocket domain into the page
104
+ from IPython.display import display, Javascript
105
+
106
+ # The kernel domain follows the pattern:
107
+ # 8080-{session}.{region}.prod.colab.dev
108
+ # We need to discover this or pass it from Python
109
+
110
+ display(Javascript(f"""
111
+ window.CUBEVIS_COLAB_PORT_{port} = {{
112
+ port: {port},
113
+ kernelId: '{kernel_id}'
114
+ }};
115
+ console.log('Colab port info injected:', window.CUBEVIS_COLAB_PORT_{port});
116
+ """))
117
+
118
+ print(f"✓ Colab: Exposed WebSocket port {port} via iframe proxy")
119
+ print(f" Kernel ID: {kernel_id}")
104
120
 
105
121
  except Exception as e:
106
122
  print(f"⚠ Warning: Could not expose port {port} in Colab: {e}")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cubevis
3
- Version: 1.0.36
3
+ Version: 1.0.37
4
4
  Summary: visualization toolkit and apps for casa
5
5
  License: LGPL
6
6
  Author-email: Darrell Schiebel <darrell@schiebel.us>,Pam Harris <pharris@nrao.edu>
@@ -50,7 +50,7 @@ cubevis/bokeh/models/_showable.py,sha256=7BtQgl0tMSqcZrPrH4FnC2ei_FOVnO-SIhBH1_r
50
50
  cubevis/bokeh/models/_tip.py,sha256=yNoUWods0xxva1WOfh5It_Y8hbpVy8RVXUmm8p7a58M,1431
51
51
  cubevis/bokeh/models/_tip_button.py,sha256=mwk1C7BMVlZrAAyQLn45S4Q9GEQfU_wU2MWpO0Gwzj4,1610
52
52
  cubevis/bokeh/sources/__init__.py,sha256=4FsudFuVU4o7VG5OG3K1tiMoxIXcJWNz_K9yzMDE8ls,1581
53
- cubevis/bokeh/sources/_data_pipe.py,sha256=KS63OtJp2ZGnqYQA1BXuJeYUPMDP831EAhpLQ2-a3AM,20884
53
+ cubevis/bokeh/sources/_data_pipe.py,sha256=ujO6IBu1DJmG3wnumo2soGLeo7ZG10twMloXobw_qmk,21372
54
54
  cubevis/bokeh/sources/_image_data_source.py,sha256=5sEWdfqoMk08HQ0JWg6bHJ34dWmphHm52nOZywSAE5c,3789
55
55
  cubevis/bokeh/sources/_image_pipe.py,sha256=pQ05VynLuJbedGja7aXDbVXFkOYbdMceOuOEj-QuluQ,28692
56
56
  cubevis/bokeh/sources/_spectra_data_source.py,sha256=qL1IOjSefWlycaqS4Pz5EHwg-1EwCVmNwxysP9lxDeM,2451
@@ -127,8 +127,8 @@ cubevis/utils/_pkgs.py,sha256=mu2CCzndmJZYP81UkFhxveW_CisWLUvagJVolHOEVgM,2294
127
127
  cubevis/utils/_regions.py,sha256=TdAg4ZUUyhg3nFmX9_KLboqmc0LkyOdEW8M1WDR5Udk,1669
128
128
  cubevis/utils/_static.py,sha256=rN-sqXNqQ5R2M3wmPHU1GPP5OTyyWQlUPRuimCrht-g,2347
129
129
  cubevis/utils/_tiles.py,sha256=A9W1X61VOhBMTOKXVajzOIoiV2FBdO5N2SFB9SUpDOo,7336
130
- cubevis/__version__.py,sha256=t7nS-AeZC_7AURxJmpAxSyaV_CmlKVxdxiqc9kbZe48,22
131
- cubevis-1.0.36.dist-info/WHEEL,sha256=B19PGBCYhWaz2p_UjAoRVh767nYQfk14Sn4TpIZ-nfU,87
132
- cubevis-1.0.36.dist-info/METADATA,sha256=Q4HZD1HcdM_xRLrePTFlQR2stCPNg2CnueBQ2TP59V8,2632
133
- cubevis-1.0.36.dist-info/licenses/LICENSE,sha256=IMF9i4xIpgCADf0U-V1cuf9HBmqWQd3qtI3FSuyW4zE,26526
134
- cubevis-1.0.36.dist-info/RECORD,,
130
+ cubevis/__version__.py,sha256=Dk6NgvEkA90YBcCXKEWVV2hm_K3yECrlMiKnBRcIDXU,22
131
+ cubevis-1.0.37.dist-info/WHEEL,sha256=B19PGBCYhWaz2p_UjAoRVh767nYQfk14Sn4TpIZ-nfU,87
132
+ cubevis-1.0.37.dist-info/METADATA,sha256=gYmpxgO-lAivKsf19d3o4JgIuez4ZAQU91CjEKWUasU,2632
133
+ cubevis-1.0.37.dist-info/licenses/LICENSE,sha256=IMF9i4xIpgCADf0U-V1cuf9HBmqWQd3qtI3FSuyW4zE,26526
134
+ cubevis-1.0.37.dist-info/RECORD,,