Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/code demo #71

Merged
merged 3 commits into from
Nov 19, 2019
Merged

Feature/code demo #71

merged 3 commits into from
Nov 19, 2019

Conversation

joelachance
Copy link
Collaborator

Resolves #66

@stefanv
Copy link
Contributor

stefanv commented Nov 15, 2019

@joelachance This is great! Should we consider a more minimalistic environment with only NumPy installed, and perhaps initialize the terminal with numpy already imported as np?

@rgommers
Copy link
Member

rgommers commented Nov 15, 2019

I like this as well! It's quite responsive, much faster than I'm used to with Binder. I guess it's a function of the set of requirements.

Should we consider a more minimalistic environment with only NumPy installed, and perhaps initialize the terminal with numpy already imported as np?

Is this for loading speed, or for saving Binder resources, or ... ?

@stefanv
Copy link
Contributor

stefanv commented Nov 15, 2019

Is this for loading speed, or for saving Binder resources, or ... ?

It probably won't affect the loading speed too much; more so we have control over the environment we operate in (numpy version, etc.).

If we want to increase response time, we do have the option of hosting (or sponsoring) a MyBinder instance that serves the NumPy image exclusively (most of the start-up time on the MyBinder time is spent moving images to execution nodes, if I understand correctly).

There are further optimizations on the table, such as holding a cache of ready kernels and dishing them out as needed, but that is clearly out of scope for this project.

@rgommers
Copy link
Member

It probably won't affect the loading speed too much; more so we have control over the environment we operate in (numpy version, etc.).

Adding just matplotlib seems nice, that way we can use nicer demo code. That should not affect the numpy version that gets installed.

And perhaps we can put the %matplotlib inline into a config file to always enable it?

@rgommers
Copy link
Member

@scopatz this is the PR with ThebeLab that we talked about. @joelachance, @scopatz is working on something similar, more general / not Jupyter based (he can explain better). He may be interested to chat/collaborate.

@scopatz
Copy link

scopatz commented Nov 15, 2019

Thanks @rgommers!

@joelachance - can we maybe jump on a call next week sometime? Feel free to email me at scopatz(AT)quansight.com

@joelachance
Copy link
Collaborator Author

This is great! Should we consider a more minimalistic environment with only NumPy installed, and perhaps initialize the terminal with numpy already imported as np?

What we currently have in this PR is the default ThebeLab/Binder image. We can create our own if we'd like, but we will have to host it somewhere. The default image is already very minimal, but as it does take a brief moment to initialize, a smaller image might improve loading time (probably not a huge priority).

A couple of enhancements I think would be nice are as follows:

  • A spinner/loader inside of the 'Run' button (in place of the 'Run' text) when the kernel is initializing
  • A default numpy import at the top, maybe even a static one above the cursor. I considered removing imports from the default example (but including them when the code is run), but I'm not sure this is best. I think it's good for beginners to know you have to import the library. @rgommers, I agree about including %matplotlib inline with the code that is run, but not in the terminal window.

There's one or two more, but I can't remember right now :) I'm on the fence about including matplotlib, mostly because of css/styling reasons (the default plot works, but the 'terminal window' isn't going to resize for a larger plot, for example). I think seaborn might be included too, but I haven't checked.

@joelachance
Copy link
Collaborator Author

@scopatz, I will email you!

@@ -21,5 +21,7 @@
<!-- Google Fonts - Ubuntu -->
<link href="https://fonts.googleapis.com/css?family=Ubuntu&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Rubik&display=swap" rel="stylesheet">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you are using Lato font now then can we remove Rubik font link ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we can.

I've been playing around with fonts for the main hero title. I'm not sure Ubuntu is the best choice here, although I do think it looks quite nice for body text.

I'll write more soon in #48.

@rgommers rgommers merged commit 70f0b51 into newsite Nov 19, 2019
@rgommers rgommers deleted the feature/code-demo branch November 19, 2019 22:55
@rgommers
Copy link
Member

This is in good shape so I'm merging it to not have to migrate it to master later. The left over review comments can be discussed/addressed here of course (and fixed with a PR to master :) )

@rgommers
Copy link
Member

Thanks @joelachance and all reviewers, this is really nice!

@InessaPawson
Copy link
Member

InessaPawson commented Feb 20, 2020

@joelachance @rgommers To follow up on our last meeting discussion I'm submitting the screenshots of the homepage shell. Runing on MacOS. It’s the same scenario with Safari and Firefox. I'm unable to get past the third screenshot. It was not an issue while I was in the US.

Let me know if I should open a separate issue for this.

numpyshell1

numpyshell2

numpyshell3

@joelachance
Copy link
Collaborator Author

@InessaPawson The third screenshot is the shell itself-- I had restyled it, but you're the second person to note some confusion about the new styles, so I'm planning on updating this to look more like it did before. If you click at the end of the import numpy as np line, you should be able to type more and run your code.

@InessaPawson
Copy link
Member

A-ha! I guess, my confusion is exacerbated by the fact that I remember the previous version.:) Perhaps, we could offer a prompt in a darker shade of grey, e.g. “Enter your code here…”
Or something similar to repl.it : “Not sure what to do? Run some examples/an example. Start typing to dismiss.”
P.S. You have to appreciate the randomly generated name of this repo.;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Interactive Shell
6 participants