pixiedust / pixiedust_node

Jupyter magic to allow Node.js code to run in a notebook
https://medium.com/ibm-watson-data-lab/running-node-js-notebooks-in-watson-studio-a8f6545d8299
Apache License 2.0
213 stars 24 forks source link

Refactor, Windows and Python 3 run fixes #17

Closed jsnowacki closed 6 years ago

jsnowacki commented 6 years ago

The PR was originally motivated by package not working on Windows. Later it came out that there is quite a bit of common code, which may be refactored before fix, so I did that.

I also added fixes for Python 2-3 compatibility, though, if more issues occur package six should be used. Also, the classes inherit from one another and they are short so I moved them into one module (file) as, again, this is more pythonic. I fixed some PEP 8 complaints highlighted by IDE but not all.

I also added requirements for the explicitly called packages, like pandas and ipython as it is good practice to list them in requirements if they are explicitly called in the code.

Fixes summary:

I performed smoke tests in jupyter on Python 2 and 3, but they may be minimalistic as there are no formal tests present in the code.

glynnbird commented 6 years ago

Thanks @jsnowacki . I'll take a look at this today and see if we can get a new release out soon :)