Giter VIP home page Giter VIP logo

sos-javascript's Introduction

PyPI version Build Status Codacy Badge Coverage Status

sos-javascript

SoS extension for JavaScript. Please refer to SoS Homepage for details.

sos-javascript's People

Contributors

bopeng avatar henryleongstat avatar joannfeng avatar

Watchers

James Cloos avatar  avatar Omid Jafari avatar  avatar

sos-javascript's Issues

Suppress output from %get and %put

Currently, %get and %put magics create outputs with the value of the variables being passed.
Under some circumstances (passwords, or just long very values) this might not be the desired behavior.

Small example below:
firefox_saMlbd3abC

Is there a way to suppress this output?
I have tried playing around with the %capture magic (which seems to be the standard way to suppress outputs in a notebook) but with no luck.

Support for TypeScript

TypeScript was not supported because of itypescript depends on Python 2.x. I have just tried and confirmed that this kernel now supports Python 3.x and I can load the kernel without problem. We should add support to TypeScript.

sos_notebook/kernel.py:837: RuntimeWarning: coroutine 'sos_JavaScript.get_vars' was never awaited

Hi!

We've updated our jupyterlab/sos installation with the following module versions:

jupyterlab                    3.6.5
jupyterlab-sos                0.9.0
sos                           0.24.1
sos-bash                      0.21.0
sos-javascript                0.20.0
sos-matlab                    0.20.2
sos-notebook                  0.24.2
sos-papermill                 0.2.1
sos-python                    0.20.0
sos-r                         0.20.1

... and we have notice one blocking issue.

This cell:

%use SoS
%put my_var --to JavaScript

gives the following warning:

/opt/jlab-env/lib/python3.11/site-packages/sos_notebook/kernel.py:837: RuntimeWarning: coroutine 'sos_JavaScript.get_vars' was never awaited
  get_vars_func(items)
RuntimeWarning: Enable tracemalloc to get the object allocation traceback 

and my_vars is not exported back to the Javascript subkernel (transfer from JavaScript to SoS works).

I changed the file sos_javascript/kernel.py and removed the async keyword in front of the get_vars(...) method and now it works (i.e. no more warning and variable is transferred).

However, I am not sure about this change, since sos_r/kernel.py also has an async get_vars(...) and I don't see any warning when using it.

What's the proper way of fixing this?

Large arrays don't move from Javascript to the SoS kernel

Thank you for the great work. We've been using SoS to teach image processing laboratory sessions with JupyterLab, and it has been a life-saver.

We are in the progress of updating our JupyterLab hub from v1 to v2. Currently, our production machines are in 1.2.18 and the staging platform is in 2.2.9. Both have the iJavascript kernel installed (5.2.0) and SoS working well between SoS and Javascript. However, for some reason I can not understand, in JupyterLab v2 JavaScript arrays seem to move to the SoS kernel only if they contain less than 2220 elements (see screenshots below).

A bit more information on the SoS packages in each machine.

Production machine (JupyterLab v1, everything working well)

sos==0.21.12
sos-bash==0.20.0
sos-javascript==0.18.1
sos-julia==0.18.5
sos-matlab==0.18.4
sos-notebook==0.21.12
sos-papermill==0.2.0
sos-python==0.18.4
sos-r==0.19.6

Staging machine (JupyterLab v2, weird limit in size of JS array)

sos==0.22.5
sos-bash==0.20.0
sos-javascript==0.18.1
sos-julia==0.18.5
sos-matlab==0.18.5
sos-notebook==0.22.4
sos-papermill==0.2.1
sos-python==0.18.4
sos-r==0.19.6

2219

2220

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.