Giter Club home page Giter Club logo

widget-code-input's People

Contributors

dou-du avatar giovannipizzi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

widget-code-input's Issues

multiple calls to IPython.display() renders CodeInput in wrong cell

Hello everyone,

When we display(codeinput) multiple times, the content of the WidgetCodeInput is rendered only on the output of the first display() call, and the following calls yield blank boxes.
image

The expected behaviour would be to have two separate renderings of the same Widget connected to the same backend View, according to the ipywidgets doc. This happens without problem for standard ipywidget Widgets.

My impression after reading this bit about WidgetModels is that the Typescript back-end object has trouble identifying which one of the WidgetView is trying to render the WidgetModel.

I am using Safari/Firefox and
widget_code_input : 3.5.5
IPython : 8.3.0
ipykernel : 6.9.1
ipywidgets : 8.0.3
jupyter_client : 7.2.2
jupyter_core : 4.11.1
jupyter_server : 1.18.1
jupyterlab : 3.4.8
nbclient : 0.5.13
nbconvert : 6.4.4
nbformat : 5.3.0
notebook : 6.4.11
qtconsole : 5.3.1
traitlets : 5.3.0
ipywidgets : 8.0.3

Code to reproduce :

#first cell

from widget_code_input import WidgetCodeInput

codeinput = WidgetCodeInput(
        function_name="foo", 
        function_parameters="",
        docstring=""" """,
        function_body="""

return True
"""
        )

display(codeinput)
# second cell 
display(codeinput)

Thank you very much for the help,

João

string causes problem with the widget

def my_function():
    return 'test'

When input string into the widget, it keeps throwing out errors. It seems related to quotation mark.
More detailed investigate needs to be done.

Support for jupyterlab 2.x

Hi!

Does this widget support jupyterlab 2.x?
I'm planning to move Noto to JL 2.

Best regards,
Pierre-Olivier

Binder example too slow to open

I've been waiting >15 minutes (15!!) to open the projectile example in binder, and binder is still building the container!

I think that

  • we should keep the requirements.txt to a very minimal set (e.g. do we really ned to depend on jupyterlab to use this widget? If not, jupyterlab should not be in the requirements.txt; you can create a optional-requirements.txt or something like this in case)
  • we should make sure the example/demos have very minimal dependencies. I think this is achieved by only keeping the very minimal required dependencies in requirements.txt. Otherwise let's discuss.

But I think it critical that demos open super quick, otherwise nobody will ever see them if they take more than 1 min to open.
@dou-du could you check the requirements and limit to really required ones? Thanks!

(Also check this comment)

No error traceback of code input

The error traceback does not go into the code input. Compare the error message of these two functions in the image, one time defined in a code input and one time in a usual way.

from widget_code_input import WidgetCodeInput

code_input = WidgetCodeInput(
        function_name="foo", 
        function_parameters="",
        docstring="""
""",
        function_body="""
return a
"""
)
code_input.get_function_object()()
def foo():
    return a
foo()

Basically you don't know in which line the error happens in the code widget.
code_input-no_traceback_error

Issue setting uniqueID

Need to figure out how to have the uniqueID count persist when several instances of the widget are instantiated in a single notebook (currently there is an issue if >1 instance is created). _.uniqueID appears to reset to 1 each time.

pip install fail

Hi Giovanni,

I can't seem to install through pip this widget using python 3.6. I did not try with other versions.
Here is the error message I get:

Could not find a version that satisfies the requirement widget_code_input (from versions: )
No matching distribution found for widget_code_input

Otherwise I can install the repo but it seems that the requirements are not properly read.

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.