Giter Club home page Giter Club logo

juniper's People

Contributors

amn41 avatar ines 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

juniper's Issues

JavaScript output is disabled in JupyterLab

JavaScript output work in Binder notebooks but become disabled in Juniper.

I would really like to see a fix or get some hints toward it. ๐Ÿ™ Thanks in advance!

For example, the following code block

from IPython.display import Javascript

Javascript('console.log("hello world");')

works in Binder but not in the Juniper demo that uses the same repo ines/spacy-io-binder.

Loading status stays forever if no stdout is received

First of all, thanks @ines for creating an amazing tool.

My only problem is I occasionally want to create cells that don't return anything to stdout, and then Juniper's status remains a misleading "loading" even though the cell has finished executing. For example,

// settings used for the screenshot below
new Juniper({
  repo: "pyiron/pyiron",
  isolateCells: false,
})

Screenshot

If I understand correctly, it's because the MyBinder server doesn't send any of the specific messages that Juniper is looking for in the first cell, e.g. a stdout message or failure to trigger outputArea.model.clear() and insert something other than msgLoading.

So I'm trying to figure out how to listen for a more generic "finished" event sent back by the mybinder server - basically, whatever background event triggers the Jupyter cell input-prompt to change from In [*] to In [1] on MyBinder itself. I will keep trying to figure it out, but maybe someone else has more of a clue than I do.

Feature request: pre-baked outputs

Hi there.

Cheers for your work on juniper, it looks great. I'm going to try to roll it out to enable live documentation for our project.

Currently I'm thinking to configuring the pages to have expected cell outputs included statically directly after the juniper cells so people can review the page non-interactively, and also so we can potentially render pages out into a pdf document. While this is sufficient, it would certainly be nicer if juniper could be fed pre-baked outputs that it could display as default when a page is initially loaded. So if a user runs a cell interactively, the pre-baked output would be replaced with the live output.

Do you think this would be do-able without huge effort? Thanks for your efforts in any case!

Juniper and Thebelab

Juniper and Thebelab seem to tackle the same problem, with -- if I understood correctly -- similar approaches. Is there an intrinsic reason preventing the two project to converge? E.g. by merging Juniper's cool additional goodies (e.g. CodeMirror cells, ...) into Thebelab?

Cheers,
Nicolas

cache issue

Hi, anyway to clear cache.

When I tried to update mybinder and run under juniper. Its rendering past records and I have to wait around 30 mins to get it updated.

Fix for #3 not in v0.1.0 release

I downloaded the v0.1.0 source from the Releases tab, and it seems to be missing the fix discussed in Issue #3.

I searched dist/juniper.min.js for Kernel.startNew({type:this.kernelType,serverSettings:i}) and replaced that with Kernel.startNew({type:this.kernelType,name:this.kernelType,serverSettings:i}), and non-Python kernel support started working for me.

install requirements on page open

@ines thanks so much for this repo, it's really helpful for interactive documentation!

Is it possible to specify a parameter that will launch the container and download the requirements on page open, instead of when the runnable is first clicked? Our requirements take some time to install, so if we could do this in the background while they're reading content instead of making users wait ~a minute for everything to start up when they want to run the code, that would be ideal.

If its not possible, consider it a feature request ๐Ÿ™‚

Running an R kernel

I've seen R successfully used on some fabulous sites building off Juniper such as https://noamross.github.io/gams-in-r-course/ However, I would like to use Juniper outside of the spaCy course framework, so am trying to use the juniper.min.js file directly and embed in the framework I'm using.

However, even with the most basic test file I can't seem to get it to use an R language kernel. Just to get started, I'm using the existing Binder build at ines/course-starter-r so that I can eliminate that as a problem. So, based on the attributes for repo/branch/kernelType/language at https://github.com/ines/course-starter-r/blob/master/meta.json I'm trying this:

<html>
  <head>
    <title>Juniper with R</title>
  </head>
  <body>

<pre data-executable>
x <- rnorm(10)
mean(x)
x
</pre>

<script src="juniper.min.js"></script>
<script>new Juniper({
    repo: 'ines/course-starter-r',
    branch: 'binder',
    kernelType: 'ir',
    language: 'r'
})</script>

  </body>
</html>

However, when I run, I get errors which show that the code has been run through the Python interpreter, not R. Any guidance would be massively appreciated as I can't understand what I'm doing wrong.

Thanks,

Louis

use for other languages than python

thanks for the awesome library! I'm now trying to use it for a kernel in another language.

from the options I thought the parameter would be defaultLang, but from looking at the code it seems like I should pass language in the options instead:

e.g. in console

j = new Juniper({ repo: 'amn41/bash_plus_kernel/', branch: 'master', kernelType: 'bash', language: 'shell'})
j.defaultLang
"shell"

if I run this shell on binder, I am able to execute bash commands. However, when I try to do so via juniper, I get:

  File "<ipython-input-1-8619f869794b>", line 1
    python hello.py &
               ^
SyntaxError: invalid syntax

so it still seems to be creating a python kernel. I did some digging into the jupyter/services code but couldn't find any hints there.

One other hint is that if I visit the url that juniper logs to the console
Starting WebSocket: wss://hub.mybinder.org/user/amn41-bash_plus_...
I see a JSON which contains name: python3

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.