jwkvam / bowtie Goto Github PK
View Code? Open in Web Editor NEW:bowtie: Create a dashboard with python!
License: MIT License
:bowtie: Create a dashboard with python!
License: MIT License
I'm not too concerned about production worthiness. If it improves build times, I'd be in favor of switching.
https://www.sitepoint.com/yarn-vs-npm/
edit: switched
https://ant.design/docs/react/customize-theme and add option into Layout
class
App should also be deployed somewhere for demo.
https://ant.design/docs/react/introduce
strongly considering just always using ant.design styling for bowtie because
Bowtie doesn't come out of the box with authentication. If you want it, I would follow this guide and modify ./build/src/server.py
.
this would enable among other things real time streaming
redirect /
to a /login
page which is supplied by the user?
Current proposal is is to have the user provide the following:
This should be easy to support. Can use same mechanism that supported min-width and min-height and flexbox provides an easy way to size things to ratios.
follow here: #59
to reflect recent changes to the python component api
It would be handy to have a function that get's called on initial page load from the client. Here's a sketch of how this can work:
index.jsx
server.py
Layout
class to call a python function on the initial signal.using node-sass 4.1.1 works
Directory: /Users/jacques/dev/bowtie-sines/build/node_modules/node-sass
Output:
Building: /usr/local/Cellar/node/7.4.0/bin/node /Users/jacques/dev/bowtie-sines/build/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [ '/usr/local/Cellar/node/7.4.0/bin/node',
gyp verb cli '/Users/jacques/dev/bowtie-sines/build/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli 'rebuild',
gyp verb cli '--verbose',
gyp verb cli '--libsass_ext=',
gyp verb cli '--libsass_cflags=',
gyp verb cli '--libsass_ldflags=',
gyp verb cli '--libsass_library=' ]
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` failed Error: not found: python2
gyp verb `which` failed at getNotFoundError (/Users/jacques/dev/bowtie-sines/build/node_modules/which/which.js:13:12)
gyp verb `which` failed at F (/Users/jacques/dev/bowtie-sines/build/node_modules/which/which.js:68:19)
gyp verb `which` failed at E (/Users/jacques/dev/bowtie-sines/build/node_modules/which/which.js:80:29)
gyp verb `which` failed at /Users/jacques/dev/bowtie-sines/build/node_modules/which/which.js:89:16
gyp verb `which` failed at /Users/jacques/dev/bowtie-sines/build/node_modules/isexe/index.js:44:5
gyp verb `which` failed at /Users/jacques/dev/bowtie-sines/build/node_modules/isexe/access.js:8:5
gyp verb `which` failed at FSReqWrap.oncomplete (fs.js:112:15)
gyp verb `which` failed python2 { Error: not found: python2
gyp verb `which` failed at getNotFoundError (/Users/jacques/dev/bowtie-sines/build/node_modules/which/which.js:13:12)
gyp verb `which` failed at F (/Users/jacques/dev/bowtie-sines/build/node_modules/which/which.js:68:19)
gyp verb `which` failed at E (/Users/jacques/dev/bowtie-sines/build/node_modules/which/which.js:80:29)
gyp verb `which` failed at /Users/jacques/dev/bowtie-sines/build/node_modules/which/which.js:89:16
gyp verb `which` failed at /Users/jacques/dev/bowtie-sines/build/node_modules/isexe/index.js:44:5
gyp verb `which` failed at /Users/jacques/dev/bowtie-sines/build/node_modules/isexe/access.js:8:5
gyp verb `which` failed at FSReqWrap.oncomplete (fs.js:112:15) code: 'ENOENT' }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` succeeded python /Users/jacques/miniconda/bin/python
gyp verb check python version `/Users/jacques/miniconda/bin/python -c "import platform; print(platform.python_version());"` returned: "3.5.2\n"
gyp ERR! configure error
gyp ERR! stack Error: Python executable "/Users/jacques/miniconda/bin/python" is v3.5.2, which is not supported by gyp.
gyp ERR! stack You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0.
gyp ERR! stack at failPythonVersion (/Users/jacques/dev/bowtie-sines/build/node_modules/node-gyp/lib/configure.js:454:14)
gyp ERR! stack at /Users/jacques/dev/bowtie-sines/build/node_modules/node-gyp/lib/configure.js:443:9
gyp ERR! stack at ChildProcess.exithandler (child_process.js:202:7)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at maybeClose (internal/child_process.js:885:16)
gyp ERR! stack at Socket.<anonymous> (internal/child_process.js:334:11)
gyp ERR! stack at emitOne (events.js:96:13)
gyp ERR! stack at Socket.emit (events.js:188:7)
gyp ERR! stack at Pipe._handle.close [as _onclose] (net.js:501:12)
gyp ERR! System Darwin 16.4.0
gyp ERR! command "/usr/local/Cellar/node/7.4.0/bin/node" "/Users/jacques/dev/bowtie-sines/build/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /Users/jacques/dev/bowtie-sines/build/node_modules/node-sass
gyp ERR! node -v v7.4.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
Build failed with error code: 1
Fro example, you have 3 drop down widgets and you have a function that needs the state of all 3. Currently you might do something like this:
a, b, c = (dropdown() for _ in range(3))
def foo(a_value, b_value, c_value):
more_stuff()
def foo_a(a_value):
b_value = b.get()
c_value = c.get()
foo(a_value, b_value, c_value)
def foo_b(b_value):
a_value = a.get()
c_value = c.get()
foo(a_value, b_value, c_value)
def foo_c(c_value):
a_value = a.get()
b_value = b.get()
foo(a_value, b_value, c_value)
layout.subscribe(a.on_change, foo_a)
layout.subscribe(b.on_change, foo_b)
layout.subscribe(c.on_change, foo_c)
There probably are better approaches here. Dash may have a better model here that could be drawn from.
if i want to have image support I would like to be able to query for size or generate an svg from matplotlib
This is not very visible to the user right now. It's not in the docs. The only reason someone could find it is by using tab completion in IPython or viewing the dir(.)
.
The best solution is probably make a metaclass wrapper like for on_*
and do_*
copy_current_request_context
does some weird things to the session that I need to figure out. Current thinking is to return a dict of data to store. Then need to figure out a nice way to get it back out, hopefully without adding more arguments.
I hope this would enable faster interaction, enabling things seen here, without writing any javascript though of course.
refs:
the individual components aren't on the navbar which makes it slower to get to.
A possible long-term goal, but the only communication is through socket.io. We can reuse the javascript with other backends for languages like R and Julia.
ref: http://blog.udacity.com/2016/03/12-best-charting-libraries-for-web-developers.html
Could draw inspiration from matplotlib subplots api. Might want to have options to span multiple rows, instead of the somewhat rigid n
rows with a variable number of widgets per row.
One way this could be improved is for scheduled tasks tell each client to create a request to the server to get updates. This way, the server can send individual updates to each client.
On the other hand this feels a little convoluted, but I think it will work until a better solution can be found.
These can all be done with ant now.
better leverage selenium to test interface by clicking buttons and entering text etc.
it takes a while to unpickle a function for the first time.
One example is okay, but more would be much better. Would be great to add to the gallery.
possibly this:
https://github.com/milworm/react-progress-2
for example for the drop down component function do_options
can provide a nicer interface to the user.
edit: scratch that I'll just wait for this to be resolved readthedocs/readthedocs.org#1990
until then the docstrings for the on_*
methods won't show up, annoying but not a huge loss.
It's probably okay to miss messages especially if many are being sent repeatedly. Similar to how Jupyter notebooks throttle messages sent over zeromq.
bowtie demo looks a bit nicer now, should update the gif
table = SmartGrid()
then if there are hyphens in the data
table.get()
hangs.
edit: Have now also encountered this with drop down widgets. Workaround has still remained to replace the hyphens with some other character.
I don't think it's very intuitive to run ./build/src/server.py
after building the app. I wonder if there's a better way yet still simple.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.