stdout change:
The CLI should operate much the same way, with one key difference. Now, instead of reading the data file from the WriteCsvNode (aka, a pandas DataFrame), it passes the stdout buffer to the Node to output there instead. Now, you get CSV data output to the terminal instead of JSON, so you could further manipulate data more easily. For example
would take the output and display the items from column 2.
What was refactored:
Moves the work @diegostruk1 did from the Workflow class into the CLI module. Now, the CLI operates much like the UI does in orchestrating Node execution. I think this is a better separation of concerns as the Workflow now does not need to concern itself with stdin/stdout; that's entirely on the CLI app now.
Removes special methods for Read/Write execution. All nodes follow the same workflow.execute(node) path without exception. This is done by updating the Node's option_values to either stdin (if a ReadCsvNode, and stdin is not a tty) or stdout (if WriteCsvNode, and stdout is not a tty. After execution, the original file value is replaced back in the Node so it can be run via the UI, or without specifying stdin/stdout.
Minor improvements:
Adds some error checking, but still just broad exceptions.
stdout
change: The CLI should operate much the same way, with one key difference. Now, instead of reading the data file from theWriteCsvNode
(aka, a pandas DataFrame), it passes thestdout
buffer to the Node to output there instead. Now, you get CSV data output to the terminal instead of JSON, so you could further manipulate data more easily. For examplewould take the output and display the items from column 2.
What was refactored:
Workflow
class into the CLI module. Now, the CLI operates much like the UI does in orchestrating Node execution. I think this is a better separation of concerns as the Workflow now does not need to concern itself with stdin/stdout; that's entirely on the CLI app now.workflow.execute(node)
path without exception. This is done by updating the Node'soption_values
to either stdin (if a ReadCsvNode, and stdin is not a tty) or stdout (if WriteCsvNode, and stdout is not a tty. After execution, the original file value is replaced back in the Node so it can be run via the UI, or without specifying stdin/stdout.Minor improvements:
stderr
instead ofstdout
.