Adding comments
This commit is contained in:
1 parent
0858eaac23
commit
767fa25d61
1 file changed
+14
-7
@@ -7,11 +7,12 @@
|
||||
[DataStreamUserRespresentation("PythonDataframeStream")]
|
||||
public class PythonDataframeStream : ViewStream {
|
||||
private ViewStream _parent_str;
|
||||
private readonly string _parentstream_csv_file_name;
|
||||
private readonly string _in_csv_file_name;
|
||||
private readonly string _out_csv_filename;
|
||||
public PythonDataframeStream(ViewStream parent_str) {
|
||||
string id = System.Guid.NewGuid();
|
||||
_parentstream_csv_file_name = $"pdfs_in_{id}";
|
||||
_parent_str = new CSVSaverStream(parent_str, _parentstream_csv_file_name);
|
||||
var guid = System.Guid.NewGuid();
|
||||
_in_csv_file_name = $"pdfs_in_{guid}";
|
||||
_parent_str = new CSVSaverStream(parent_str, _in_csv_file_name);
|
||||
//_simple_test();
|
||||
}
|
||||
|
||||
@@ -24,8 +25,14 @@
|
||||
}
|
||||
|
||||
private void _parent_str_onchange(object) {
|
||||
throw new NotImplementedException();
|
||||
|
||||
// the file _in_csv_file_name is now populated.
|
||||
// call py_func_wrapper_main and pass this file name as well
|
||||
// as the output file name
|
||||
// py_func_wrapper_main reads _in_csv_file_name into the df and calls
|
||||
// transform function, which returns the tranformed df. py_func_wrapper_main then
|
||||
// writes it into the _out_csv_filename file.
|
||||
// now this function should read _out_csv_filename into a dp
|
||||
// and fire it
|
||||
}
|
||||
|
||||
private void _compute() {
|
||||
@@ -68,7 +75,7 @@ if __name__ == '__main__':
|
||||
out_path = sys.argv[2]
|
||||
rv = test(arg, out_path)
|
||||
rv = rv + 12
|
||||
with open(out_path, 'w') as f:
|
||||
with open(out_path, 'w') as f:to \
|
||||
f.write(str(rv))";
|
||||
|
||||
File.WriteAllText("runner.py", py_func_wrapper_main);
|
||||
|
||||
Reference in new issue
Block a user