Code Monkey home page Code Monkey logo

interact.jl's Introduction

Interact

Build Status

Play with Julia code and share the fun!

This package is a collection of web-based widgets that you can use to:

  • Do quick code experiments where you can tweak the inputs
  • Teach or share science
  • Make simple UIs for your projects, and publish them over the Web
  • Make your own reusable widgets and publish them with your Julia library!

It works in Jupyter notebooks, Atom IDE, or as a plain old web page.

Usage

@manipulate

The simplest way to use Interact is via the @manipulate macro.

interacting with sliders and toggles

The syntax of @manipulate is

@manipulate for var1=<object>, var2=<object>, etc...
    # do something with a, b, etc...
end

Here <object> can be one of the following:

  • A Range: (any AbstractRange of Real numbers): this will create a slider using which you can select one value for the variable from the range.
  • An Array: This will create a series of toggle buttons which you can select one at a time.
  • A Dictionary: Same as the above, but keys are used as the labels for the buttons, the value corresponding to the selected key will be the value of the variable.
  • A String: This will create a text box with the given string as the default value, you can edit the string to update the value of the variable.
  • A boolean: This will create a checkbox which is checked if the value is true, unchecked if it is false. You can toggle the checkbox to change the value of this variable.
  • A number: This will create a spinbox where you can input, increment or decrement a number. Note that an Integer will only allow input of integers.
  • A date or time: (from the Dates standard library). this will create a date picker with the date set to the given date.
  • A color: (from the Colors package.) This will create a color picker!
  • An Interact widget: (advanced) see below for how to create widgets à la carte. Check out the big list of widgets here.
  • An Observable: An Observable can be used here to assign its current value to the variable. Any update to the variable will trigger an update to the @manipulate. Note that the result of an @manipulate is also an observable!

Widgets à la carte

You can also create widgets by themselves using the same input scheme. Just pass the <object> to widget() which has the syntax:

widget(<object>; label="<my label>")

For example,

px=widget(0:0.01:.3, label="px")
py=widget(0:0.01:.3, label="py")
plane = widget(Dict("x=0" => 1, "y=0" => 2), label="Section plane");

Then you can use map over the widgets to create new interactive output that depends on these widgets!

interactive_plot = map(plotsos, px, py, plane)

And put them all together into a nice little layout:

# stack vertically
vbox(
    hbox(px, py, plane), # stack horizontally
    interactive_plot)

If you would like even more customization for your widgets, each type of widget has a different set of options you can tweak and different ways of updating it. So head over to the documentation about them!

This demo has color and date pickers!

Getting started

Interact's output can be displayed either within Jupyter/Jupyterlab notebooks, the Atom text editor, or as a stand-alone web page. Below are the set up instructions for each of these front ends:

IJulia + Jupyter notebooks

To set up Interact to work in Jupyter notebooks, first install Interact, IJulia and WebIO packages. Then install the required Jupyter extension by running:

using WebIO
WebIO.install_jupyter_nbextension()

Important: If you performed this step while the Jupyter notebook server is running, you will need to restart it for the extension to take effect.

If you have multiple Jupyter installations: The WebIO.install_jupyter_nbextension([jupyter]) function takes the path to the jupyter binary as an optional argument. If omitted, the installation first tries to find jupyter in your OS's default path. If it does not exist there, it tries to find a version that was installed using Conda.jl (which is the default when IJulia is installed without having an existing Jupyter set up, or by forcing it to install a copy via Conda.) If you have a jupyter binary in your OS path but also have a version installed via Conda and want to use the one installed via Conda, then you can set this keyword argument to be WebIO.find_jupyter_cmd(condajl=true). For more information about the Jupyter integration, see WebIO's documentation. There is more troubleshooting information here.

IJulia + JupyterLab

To set up Interact to work in JupyterLab, first install Interact, IJulia and WebIO packages. Then install the required JupyterLab extension by running:

using WebIO
WebIO.install_jupyter_labextension()

Important: If you performed this step while the JupyterLab server is running, you will need to restart it for the extension to take effect.

This function also takes the jupyter path as an optional argument. See the above subsection on installing on Jupyter notebooks for more description of the default behavior when this argument is omitted and pointers to troubleshooting information. tl;dr: if you launch JupyterLab via IJulia.jupyterlab(), run

using WebIO
WebIO.install_jupyter_labextension(condajl=true)

to force WebIO to be installed to the correct place.

Within the Atom text editor

If you have set up the Julia integration provided by Juno, evaluating any expression which returns an Interact-renderable object (such as a widget or the output of @manipulate) will show up in a plot-pane within the editor. No extra setup steps are required.

As a standalone web page

Any Julia function that returns an Interact-renderable object (such as a widget or the output of an @manipulate) can be repurposed to run as a simple web page served by the Mux web app framework.

using Mux, WebIO
function app(req) # req is a Mux request dictionary
 ...
end
webio_serve(page("/", app), 8000) # this will serve at http://localhost:8000/

Bonus: Publish something to Heroku!

Check out this repository which has a script to publish Interact app to Heroku with a simple command!

Example notebooks

A great resource to learn to use the various features of Interact is to try out the example notebooks and the tutorial in the doc/notebooks/ directory. Start up IJulia from doc/notebooks/:

using IJulia
notebook(dir=".")

Explore the wider widget ecosystem

Interact is built using WebIO which is a "hub" package that supports an ecosystem of composable web-based widgets that all share the same availability on the Julia front-ends.

Check out this introduction notebook about the WebIO ecosystem if you want to learn about how you can customize your UI using HTML, JavaScript and CSS. It will also get you started on writing your own widgets that others can use.

  • TableView.jl: show a spreadsheet view of any Table datatype
  • CSSUtil: wraps CSS functionality in easy Julia functions. Also renders markdown (and LaTeX). See the CSSUtil section in the introduction notebook linked above.
  • Your cool package. Let us know by opening an issue to add your WebIO/Interact-based package here!

Learning more

To learn more, check out the documentation.

interact.jl's People

Contributors

asinghvi17 avatar babaq avatar baggepinnen avatar blandry avatar bluesmoon avatar catawbasam avatar dpsanders avatar faviovazquez avatar github-actions[bot] avatar jiahao avatar jobjob avatar juliatagbot avatar logankilpatrick avatar mkitti avatar mlubin avatar mortenpi avatar piever avatar rdeits avatar shashi avatar skleinbo avatar srenatus avatar staticfloat avatar stevengj avatar tanmaykm avatar timholy avatar tkelman avatar tkoolen avatar twavv avatar wookay avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

interact.jl's Issues

Text vs. HTML vs. Latex?

I'm not sure what these widget types are for (they seem like outputs rather than inputs?), but it seems wrong to me. It seems like we should be using the writemime functionality instead.

That is, if you want to display an object x, you act just like display(x): you check mimewritable("text/html", x) etcetera to see what output formats it supports.

More example notebooks

  • One notebook documenting all possible widgets
  • One notebook on interactive plotting with Gadfly and PyPlot

Gadfly plots not working

Since you fixed the last issue so quickly, I figured I'd give you more

Using Julia master, IPython 2.3.1, latest Interact.jl and Gadfly 0.3.10 (latest), I have problems with the Gadfly plots in the "03-Interactive Diagrams and Plots" documentation notebook.

In Firefox 34, the plot's content doesn't show, the axes do. The js-console has one potentially related output "Empty string passed to getElementById().":

gadfly-interact-ff

In Chromium 39, the plot shows correctly, but any interaction doesn't update the plot, though the Kernel indicator shows "Kernel Busy" for a brief period after any interaction. Seemingly no interesting output in the js-console:

gadfly-interact-chr

Using Gadfly itself without any @manipulate works perfectly fine in the exact same notebook, which makes me think it's an Interact.jl issue.

`PyPlot` plots not updated in `@manipulate`

Interact.jl is great, thanks!
But...

using Interact
using PyPlot

function g(N)
    PyPlot.plot(rand(N), rand(N), "o")
end

@manipulate for N in 1:100
    g(N)
end

gives a single plot that is not updated when the slider is moved.

However, executing another empty code cell shows all the other plots that were generated by the @manipulate command!

julia> versioninfo()
Julia Version 0.3.1-pre+17
Commit a3e7c04 (2014-08-25 18:52 UTC)
Platform Info:
  System: Darwin (x86_64-apple-darwin13.0.0)
  CPU: Intel(R) Core(TM) i7-2677M CPU @ 1.80GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Sandybridge)
  LAPACK: libopenblas
  LIBM: libopenlibm
  LLVM: libLLVM-3.3

@animation

It could be very nice if there also were an @animation macro, since the tool works on a lot of different plots, it is not fast but it's versatile. It could turn the first range in @manipulate to the time dependent variable and then have a Play, Pause, Prev, Next botton to interaction.

edit: @ivarne - quoting macros

missing checkbox constructor

You defined widget(x::Bool, label="") = checkbox(x, label="") but there is no Checkbox(::Bool) contructor. Adding checkbox(x::Bool; kws...) = checkbox(; value=x, kws...) seems like it should do the trick. But probably it's cleaner to just define:

widget(x::Bool, label="") = checkbox(value=x, label=label)

(Also note that you accidentally were deleting the label.)

Contributed Examples

We should probably find a better way to collect examples. Meanwhile, let's use this issue to show off cool things you create with Interact. Code snippets, nbviewer / github links are all welcome.

Here's something to start this off :)

# (phantom) particles in a box

using Reactive, Interact
using Color, Compose

box(x) = let i = floor(x)
    i%2==0 ? x-i : 1+i-x
end

colors = distinguishable_colors(10, lchoices=[82.])

dots(points) = [(context(p[1], p[2], .05, .05), fill(colors[i%10+1]), circle())
    for (i, p) in enumerate(points)]

@manipulate for t=timestamp(fps(30)), add=button("Add particle"),
    velocities = foldl((x,y) -> push!(x, rand(2)), Any[rand(2)], add)

    compose(context(),
            dots([map(v -> box(v*t[1]), (vx, vy)) for (vx, vy) in velocities])...)
end

particles

@manipulate syntax

It might be more Julian to have @manipulate foo(x) for x in ..., i.e. with a for keyword.

Plain text output widget

Does interact have an output widget for just plain text? I didn't see it in widgets.jl. Currently, I'm just returning a string, but that's not as nice because it shows rather than prints.

don't swallow exceptions

@manipulate for i = 1:10
    i > 7 ? i * "2" : 2*i
end

instead of throwing an exception when the slider is dragged past 7, it just silently doesn't display an update.

dropdown widget prevents shift-enter from working

doing using Interact; dropdown(["one","two","three"]) in IJulia, and then changing the dropdown selection, seems to make IPython ignore shift-enter in subsequent cells; or rather it treats it just as "enter" and inserts an ordinary newline in the cell.

(I can still run subsequent cells, but only by clicking the "run" button in the toolbar.

So, somehow the dropdown widget seems to be altering IPython's keybindings. (@Carreau?)

eval-free @manipulate macro

Unlike @lift (which can probably be deleted now that we have @manipulate, by the way), I think you can write @manipulate so that it doesn't use eval. Using eval is always a bad idea in a macro, because it makes it extremely brittle, e.g. you can't use the macro inside a function. Following the syntax in #8, just have the macro transform:

@manipulate for x1=params1, x2=params2
    expression
end

into something like

let x1=widget(params1, label="x1"), x2=widget(params2, label="x2")
    display(x1)
    display(x2)
    lift((x1,x2) -> expression, x1, x2)
end

where widget is an overloaded function that creates a default widget (or anything that can be passed to signal) from the parameters of a given type. e.g. widget(::Bool) will create a checkbox, widget(::Range) will create a slider, etcetera.

This has the additional advantage that the available widgets for @manipulate are no longer hard-coded. Any package can provide additional widgets just by overloading widget.

Iteract doesn't work in the slideshow mode

Julia Version 0.3.6 (2015-01-08 22:33 UTC)

Interact works fine in IJulia

works

But it doesn't work for slides.

The conversion to slides was done with:
ipython nbconvert Interact.ipynb --profile=julia --to=slides --post=serve

slides

Support side-effects inside @manipulate / support container widgets

@manipulate for i=1:10
    println(i)
end

does not work, leading to confused users (#40, and #26). One possible fix:

Transform manipulate blocks so that they push a display to the stack, and pop it at the end. Then take everything that got printed and the value of the last expression and push them to the front-end. This will require implementing some kind of containers so that values of different mime types can be displayed in the same cell output.

Second possible fix:

Since the only use of println / display is to display multiple things as a result of the same @manipulate block, it could be OK to just somehow implement containers and not care about side effects.

Selecting from a list does not work

Neither the value of n nor the plot is updated with the following code where n is selected from a list (which gives boxes to select from):

using Interact
using PyPlot

f = figure()
@manipulate for n in [3, 5, 7]
    withfig(f) do
        display(n)
        plot(rand(n), "o-")
    end
end
julia> versioninfo()
Julia Version 0.3.1-pre+17
Commit a3e7c04 (2014-08-25 18:52 UTC)
Platform Info:
  System: Darwin (x86_64-apple-darwin13.0.0)
  CPU: Intel(R) Core(TM) i7-2677M CPU @ 1.80GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Sandybridge)
  LAPACK: libopenblas
  LIBM: libopenlibm
  LLVM: libLLVM-3.3

IPython requirements?

I tried the example notebook in IPython 2.1.0, and it doesn't seem to work. I can create a slider, but then signals based on it don't update.

Does Interact require a newer IPython? If so, please mention this in the README.

(Though it's confusing since I though interactive widgets were in IPython 2....)

Interact and IPython 3.0-dev

Is Interact known not to work with ipython 3.0-dev?
the following example runs on ipython 2.3, but does not produce any output using ipython 3.0-dev:

using Interact, Gadfly

@manipulate for y in 1:5 
    plot(x -> x^y, -5, 5) 
end

Missing output of togglebuttons

i made togglebuttons based on the same options except previous togglebuttons selection.

ff = ["F1","F2","F3","F4"]
f1 = togglebuttons(ff)
display(f1)
f2 = lift(x->togglebuttons(filter(a->a!=x,ff)),f1)
display(f2)
display(f1.signal)
display(f2.value.signal)

second togglebuttons could be correctly lifted whenever first togglebuttons was selected, but the order of togglebuttons wasn't the same order of the filtered options.

Also, when first togglebuttons was selected to other than F1, the second togglebuttons could not give the F1 output.

capture

is there anything i am missing?

Signal{Widget} display

Hello! I'd like to be able to have widgets display based on values of signals.
Here is an attempt, should it work and allow me to choose the widget that gets displayed?

widget_choice = togglebuttons(["slider","checkbox"], label="choose a widget")
display(widget_choice)
slider_to_show = slider(1:10; label="killr slider")
checkbox_to_show = checkbox(true; label="my new checkcheck")
widget_chosen = lift(x->x=="slider"? slider_to_show : checkbox_to_show, Widget, widget_choice)
display(widget_chosen)

It starts out fine, initially showing the slider, when I choose checkbox I get this:

screen shot 2015-01-06 at 11 36 41 am

If the checkbox is the default in the togglebuttons and then I choose slider, this is the outcome:
screen shot 2015-01-06 at 11 47 10 am

Julia is 0.3.3, Interact is 0.1.6, Reactive is 0.1.10
Cheers.

Widget options

IPython widgets have attributes such as label, orientation, readout, etc. It would be nice to have an options field in Widgets which is of a composite type. A nice API through kwargs would be good. It would be fantastic if this field is allowed to be a Signal and lift is obviated.

Layout Options for Widgets

Is there any way to control where widgets will appear when displaying more than one of them? E.g. say I wanted to have multiple checkboxes side by side. They seem to stack vertically by default. Something like hstack in Gadfly would be great. I guess this is somewhat related to #38 which I also would very much like to see.

Would be happy to have a bash at it but not sure really where to start.

Ta!

manipulate not working, but no errors shown

I have slightly unorthodox notebook setup: IJulia is running bound to localhost and is then being served to the world over HTTPS via an nginx instance:

[IJulia:8998]  <---->  [nginx:443]  <---->  [browser]

Everything works great, EXCEPT Interact.jl and hence, @manipulate. I checked my javascript console for weird errors and I didn't really see anything suspicious, so I was hoping that one of you guys would be able to help me debug this. My guess is that I am somehow screwing up the websocket connection by having it go through the HTTPS transition, but I don't really know what's going on under the hood here. My nginx config is apparently enough to get basic code execution working, and enough to pop up the widgets, but once I try to, well, manipulate them, nothing happens. Here's my nginx config:

server {
        listen 443 ssl;
        server_name         ee590_julia.davinci.cs.washington.edu;
        ssl_certificate     davinci.cs.washington.edu.crt;
        ssl_certificate_key davinci.cs.washington.edu.key;

        location / {
                proxy_pass http://localhost:8998;

                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header Host $host;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header X-NginX-Proxy true;
                proxy_set_header Origin "";

                # WebSocket support
                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection "upgrade";
                proxy_read_timeout 86400;
        }
}

If you want to take a look at the actual notebook, I can mail you the password to login. This is on Julia 0.3.1 with the latest packages.

html("Hi") doesn't show anything

Everything else seems to work fine, just not HTML outputs. I can reproduce this using the introduction notebook from the docs, but even a simple html("<b>Hi</b>") fails. I'm on Julia master, IPython 2.3.1 and see the same behavior both in Firefox and Chromium. From the inspector, you can see that it correctly sets the output cell's type to html. In the js console, I can see something being null.

The 404 not found you see is unrelated as it's just the source-map which the inspector looks for.

Any ideas?

no-html
no-html2

Validating input

I would like to put constraints on my inputs making them either co-dependent or at least validate them take the following Gadfly plot

@manipulate for μ in -5:5, σ in 0:5, min in -10:0, max in 0:10
    dist = Normal(μ, σ)
    plot(x -> pdf(dist,x), min, max) 
end 

I would like to validated an input like this.

@manipulate for μ in -5:5, σ = 10, min = -10 , max = 10 | max >= min |  σ >= 0
    dist = Normal(μ, σ)
    plot(x -> pdf(dist,x), min, max) 
end 

@manipulate not working for text/latex output

using PyPlot
@manipulate for p in 1:0.01:2
    LaTeXString("\$x^{$p}\$")
end

initially outputs via LaTeX, but as soon as I drag the slider it switches to text/plain output.

(LaTeXString is just a type defined in PyPlot that defines a writemime method to interpret the string as text/latex.)

signals don't display properly until you move the widget

With IPython 2.1.0,

s = Slider(0:0.01:1, label="Slider x:")
display(s)
lift(x -> x^2, s)

initially outputs [Lift{Float64}] 0.0, but as soon as I drag the slider it changes to just the value (e.g. 0.0529).

This is a bit jarring; the initial display and the display when you drag the slider should be of the same form.

Just tried this, works great!

# You will need:
#  Interact.jl
#  JuMP.jl
#  An LP solver: Clp.jl 
#                GLPKMathProgInterface.jl
#                ECOS.jl ...
using Interact
using JuMP
# Create model with initial default knapsack capacity
# Create model with initial default knapsack capacity
knap = Model()
@defVar(knap, 0 <= x[1:3] <= 1)
@setObjective(knap, Max, 5x[1] + 10x[2] + 7x[3])
knap_con = @addConstraint(knap, 3x[1] + 6x[2] + 3x[3] <= 1)
knap
# Now vary the right-hand-side and see how the solution changes
@manipulate for capacity in 0:12
    chgConstrRHS(knap_con, capacity)  # Change the capacity
    display(knap)  # Display model
    solve(knap)  # Resolve
    getValue(x)  # Display solution
end

add to METADATA?

Is this ready to add to METADATA so that we can just do Pkg.add("Interact")?

Hidden state in notebooks causing loss of interactivity

Here are two notebooks

https://gist.github.com/jiahao/97c2050d369812a4416f

and

https://github.com/jiahao/ijulia-notebooks-assorted/blob/57ad26fd39ed273abd0d32a301966791219a45c7/Nuclear%20energy%20levels.ipynb

which, as far as I can tell, have identical content. However the Interact widget in the first notebook doesn't work for me, but works in the second notebook, which was created by pasting each cell from the first notebook into a new notebook.

slider widget is broken for integer ranges

Interact.widget(1:10) gives:

`__slider#17__` has no method matching __slider#17__(::Float64, ::Input{Float64}, ::ASCIIString, ::UnitRange{Int64})
while loading In[23], in expression starting on line 1
 in widget at /Users/stevenj/.julia/Interact/src/manipulate.jl:5

widget API tweaks

It would be more natural to use a range object to give the slider range, and also this seems like a good candidate for keyword options. i.e.

Slider{T<:Number}(r::Range{T}; label="", value::T=median(r)) = ...

Using a range internally will also allow you to take advantage of the cleverness in FloatRange in constructing roundoff-resistant floating-point ranges.

I would similarly use keywords for other widgets, e.g.

Checkbox(label::String; value=false) = ...

RadioButtons{T}(options::Labeled{T}...; label::String="", value::T=options[1].value) = ...
RadioButtons{T}(options::T...; kws...) = RadioButtons(map(Labeled, options)...; kws...)

Dropdown{T}(options::Labeled{T}...; label::String="", value::T=options[1].value) = ...
Dropdown{T}(options::T...; kws...) = Dropdown(map(Labeled, options)...; kws...)

I would also tend to use Label instead of Labeled. It is shorter, it follows the noun convention for types, and it avoids the controversy of spelling "labeled" vs. "labelled".

lower case widget functions?

I have come to prefer having lower cased functions that return values of their camel cased types. This looks like a pretty common pattern in Julia. e.g. string, int, plot, etc. This has also been the pattern used in Gadfly. Better to do this now than have this as a breaking change later.

Do you guys have any comments on this? @dcjones @stevengj

Widget options

IPython widgets have attributes such as label, orientation, readout, etc. It would be nice to have an options field which is of a composite type in the widgets and provide a nice API through kwargs. It would fantastic if this field is allowed to be a Signal as well.

Fix PyPlot plots

Right now, signal of PyPlot plots do not update. Instead, updates get drawn on to the same plot in the kernel and the new plot appears out of the blue when executing any other cells.

combined widget/output type?

One thing that I don't like about the current @manipulate (besides #11 and #8) is that it relies upon display side effects. Not only does this mean that it can't be easily used in a functional context, but it also means that the widgets may be displayed out-of-order (since zeromq does not guarantee that messages arrive in-order, although they usually do in practice) (not true: zmq apparently does guarantee order).

It would be nice to be able to return a single object from @manipulate that encapsulates both the widgets and the displayed signal result, such that calling display on it will display all of them together.

Unfortunately, this may be a bit tricky to implement. Ideally you would write a writemime method that stitches all the data together. But it's not so easy to stitch together, e.g. text/html widgets and text/latex signal output. You could overload display (to call display on the widgets and signals separately) instead of writemime, but this could be somewhat fragile and also wouldn't solve the in-order issue.

Compose graphics as Widgets

I would like to draw my own widget using compose and have it call a callback (read fire a signal), e.g. when I click on a circle in my picture. I tried to do this, but I failed to get a custom widget to work, so I'd also appreciate a tutorial on how to write custom widgets (maybe this use case can serve as one).

cc @dcjones

[PkgEval] Interact may have a testing issue on Julia 0.3 (2014-08-25)

PackageEvaluator.jl is a script that runs nightly. It attempts to load all Julia packages and run their tests (if available) on both the stable version of Julia (0.3) and the nightly build of the unstable version (0.4). The results of this script are used to generate a package listing enhanced with testing results.

On Julia 0.3

  • On 2014-08-25 the testing status was N/A - new package.
  • On 2014-08-25 the testing status changed to Package doesn't load.

Package doesn't load. means that PackageEvaluator did not find tests for your package. Additionally, trying to load your package with using failed.

This issue was filed because your testing status became worse. No additional issues will be filed if your package remains in this state, and no issue will be filed if it improves. If you'd like to opt-out of these status-change messages, reply to this message saying you'd like to and @IainNZ will add an exception. If you'd like to discuss PackageEvaluator.jl please file an issue at the repository. For example, your package may be untestable on the test machine due to a dependency - an exception can be added.

Test log:

>>> 'Pkg.add("Interact")' log
INFO: Cloning cache of Interact from git://github.com/shashi/Interact.jl.git
INFO: Cloning cache of React from git://github.com/shashi/React.jl.git
INFO: Installing DataStructures v0.3.1
INFO: Installing Interact v0.1.2
INFO: Installing React v0.1.6
INFO: Package database updated

>>> 'using Interact' log
ERROR: JSON not found
 in require at loading.jl:47
 in include at ./boot.jl:245
 in include_from_node1 at ./loading.jl:128
 in include at ./boot.jl:245
 in include_from_node1 at ./loading.jl:128
 in reload_path at loading.jl:152
 in _require at loading.jl:67
 in require at loading.jl:51
 in include at ./boot.jl:245
 in include_from_node1 at loading.jl:128
 in process_options at ./client.jl:285
 in _start at ./client.jl:354
 in _start_3B_1718 at /home/idunning/julia03/usr/bin/../lib/julia/sys.so
while loading /home/idunning/pkgtest/.julia/v0.3/Interact/src/html_setup.jl, in expression starting on line 3
while loading /home/idunning/pkgtest/.julia/v0.3/Interact/src/Interact.jl, in expression starting on line 84
while loading /home/idunning/pkgtest/.julia/v0.3/Interact/testusing.jl, in expression starting on line 2
Julia Version 0.3.0-rc4+4
Commit bab9636 (2014-08-20 18:47 UTC)
Platform Info:
  System: Linux (x86_64-unknown-linux-gnu)
  CPU: Intel(R) Xeon(R) CPU E5-2650 0 @ 2.00GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Sandybridge)
  LAPACK: libopenblas
  LIBM: libopenlibm
  LLVM: libLLVM-3.3


>>> test log
no tests to run
>>> end of log

Why not InputWidget{T} <: Signal{T}?

I don't see why it you have a separation between InputWidget and Input, i.e. you create a widget and then attach! an input to it.

Why not simply make the InputWidget a type of Signal? Then I could simply do e.g.

s = Slider(....)
lift(x -> RGB(x,x,x), s)

merge with IJuliaWidgets?

I'm not really clear on why these are separate packages, since Interact seems to require IJulia/IPython.

export `widget`

This is quite a useful function; it would be nice to export it.

It might also be nice to change its API to:

widget(foo; label="", kws...)

i.e. changing label to a keyword option and passing any additional keywords through to the corresponding widget constructor (for #16).

Move Interact, React to JuliaLang

cc: @StefanKarpinski

I think that the @manipulate macro etc. is likely to be pretty central to the IJulia experience; in fact, I'm inclined to have IJulia REQUIRE React and Interact now that things are shaping up. It would therefore be good to move these packages to JuliaLang so that more maintainers are available in the future.

Interact does not update cells

I have previously had Interact working, but had not used it in a while.

The sliders are created, but do not update the output of the cells: the initial output is fixed.
This is with a fresh .julia directory and fresh checkouts of IJulia and Interact.

I have no idea where to start looking for problems...

Julia Version 0.3.6-pre+43
Commit 2dfde6b* (2015-01-22 20:39 UTC)
Platform Info:
  System: Darwin (x86_64-apple-darwin14.0.0)
  CPU: Intel(R) Core(TM) i7-3720QM CPU @ 2.60GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Sandybridge)
  LAPACK: libopenblas
  LIBM: libopenlibm
  LLVM: libLLVM-3.3

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.