node-red-quantum / node-red-contrib-quantum

Quantum computing functionality for Node-RED
https://node-red-quantum.github.io/
Apache License 2.0
16 stars 2 forks source link

Louis/python-migration #111

Closed louislefevre closed 3 years ago

louislefevre commented 3 years ago

Purpose

As a side project I've been working on a TypeScript implementation of the PythonShell to publish as its own npm package, which can be found here, because I wanted to keep working on it as a module even after this project is done. At this point I feel like it is a significant improvement over the original in terms of better error handling, better compatibility with Windows, better documentation, more functionality, and more thorough testing. It also uses the 'new' style of asynchronous code that is Promises, rather than the 'old' style of callbacks. So I figured I'd open this PR to give us the opportunity to integrate this version instead of the old one, if we wish to do so.

I've also added some code in quantum-circuit.js which will check if the Python virtual environment has been set up correctly before running any Python code. If it cannot be found, then it will automatically attempt to run the pyvenv.sh script. Execution continues once the virtual environment has been set up, or ends if an error occurred.

Changes

New Requirements