-
Notifications
You must be signed in to change notification settings - Fork 2
Use a built/bundled version of iventure-jsviz.js #61
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
base: master
Are you sure you want to change the base?
Conversation
src/jsviz/jsviz.py
Outdated
return Javascript(script.format(host=host, port=port)) | ||
|
||
|
||
def whenReady(script): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No camelcase for function names in python, when_ready
.
src/jsviz/jsviz.py
Outdated
|
||
|
||
def whenReady(script): | ||
"""execute your JS script when iventure-jsviz is ready""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docsting should be punctuated as full sentence, and avoid vague references .e.g "your" (whose?)
"""Execute JS script
when iventure-jsviz is ready."""
src/jsviz/jsviz.py
Outdated
return whenReady( | ||
'interactive_bar(cell, %s)' % ( | ||
df.to_json(orient='split') | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For string formatting with a %
sign and a single parameter, force the argument into a tuple using a trailing-comma (this behavior is needed mostly to handle python quirks):
return when_ready('interactive_bar(cell, %s)' % (df.to_json(orient='split'),))
@gnarf: Can you write a README for how to use this? |
Sure, just hadn't quite gotten there yet
The questions asked by fsaad in slack were a good source for "what to write
in readme"
…On Thu, Jul 6, 2017 at 12:11 PM, riastradh-probcomp < ***@***.***> wrote:
@gnarf <https://github.com/gnarf>: Can you write a README for how to use
this?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#61 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAhh69QQMk9KZsNcnYrbOCavaAiRuhHfks5sLQcUgaJpZM4OOpPH>
.
|
This uses the output from a
npm run build
from https://github.com/probcomp/iventure-jsviz/pull/5 which creates adist/iventure-jsviz.js