├── .gitignore ├── .mailmap ├── .project ├── .pydevproject ├── CODE_OF_CONDUCT.md ├── Examples ├── Fat │ └── fat.py ├── demo_1 │ ├── data1.dat │ ├── data2.dat │ ├── output.png │ ├── simulation.py │ ├── simulation_complete.py │ └── simulator.py └── usecase_credit_fraud │ ├── README.md │ ├── basic_operations.ipynb │ ├── dataset │ └── README.txt │ ├── images │ ├── backward_deps.png │ ├── resume_trials.png │ ├── tag_values_f1.png │ ├── tag_values_model.png │ ├── tag_values_roc.png │ ├── trial_diff.png │ ├── trial_intersect_diff.png │ ├── var_tag_plot_f1.png │ └── var_tag_plot_roc.png │ ├── now_usecase_part_1.ipynb │ ├── now_usecase_part_2.ipynb │ ├── now_usecase_part_3.ipynb │ ├── now_usecase_part_4.ipynb │ ├── now_usecase_part_5.ipynb │ ├── ops.db │ └── requirements.txt ├── LICENSE ├── README.md ├── _config.yml ├── capture ├── .gitignore ├── noworkflow │ ├── __init__.py │ ├── __main__.py │ ├── kernel │ │ ├── __main__.py │ │ ├── nowkernel.py │ │ └── shell.py │ ├── now │ │ ├── __init__.py │ │ ├── cmd │ │ │ ├── __init__.py │ │ │ ├── cmd_ast.py │ │ │ ├── cmd_clean.py │ │ │ ├── cmd_dataflow.py │ │ │ ├── cmd_debug.py │ │ │ ├── cmd_demo.py │ │ │ ├── cmd_diff.py │ │ │ ├── cmd_evaluation.py │ │ │ ├── cmd_export.py │ │ │ ├── cmd_gc.py │ │ │ ├── cmd_helper.py │ │ │ ├── cmd_history.py │ │ │ ├── cmd_import.py │ │ │ ├── cmd_kernel.py │ │ │ ├── cmd_list.py │ │ │ ├── cmd_prov.py │ │ │ ├── cmd_pull.py │ │ │ ├── cmd_push.py │ │ │ ├── cmd_restore.py │ │ │ ├── cmd_run.py │ │ │ ├── cmd_schema.py │ │ │ ├── cmd_show.py │ │ │ ├── cmd_vis.py │ │ │ └── command.py │ │ ├── collection │ │ │ ├── __init__.py │ │ │ ├── metadata.py │ │ │ ├── prov_definition │ │ │ │ ├── __init__.py │ │ │ │ ├── ast_elements.py │ │ │ │ ├── ast_helpers.py │ │ │ │ ├── component_constants.py │ │ │ │ ├── definition.py │ │ │ │ ├── dependency_constants.py │ │ │ │ ├── transformer_expr.py │ │ │ │ └── transformer_stmt.py │ │ │ ├── prov_deployment │ │ │ │ ├── __init__.py │ │ │ │ ├── deployment.py │ │ │ │ ├── py2module.py │ │ │ │ └── py3module.py │ │ │ └── prov_execution │ │ │ │ ├── __init__.py │ │ │ │ ├── collector.py │ │ │ │ ├── debugger.py │ │ │ │ ├── execution.py │ │ │ │ └── structures.py │ │ ├── ipython │ │ │ ├── __init__.py │ │ │ ├── converter.py │ │ │ ├── defaults.py │ │ │ ├── dotmagic.py │ │ │ └── magics │ │ │ │ ├── __init__.py │ │ │ │ ├── command.py │ │ │ │ ├── now_ipython.py │ │ │ │ ├── now_ls_magic.py │ │ │ │ ├── now_prolog.py │ │ │ │ ├── now_restore.py │ │ │ │ ├── now_run.py │ │ │ │ ├── now_schema.py │ │ │ │ ├── now_set_default.py │ │ │ │ └── now_sql.py │ │ ├── models │ │ │ ├── __init__.py │ │ │ ├── ast │ │ │ │ ├── __init__.py │ │ │ │ ├── base_visitor.py │ │ │ │ ├── code_writer.py │ │ │ │ ├── constructor.py │ │ │ │ ├── draw_visitor.py │ │ │ │ ├── model.py │ │ │ │ └── trial_ast.py │ │ │ ├── cleaning │ │ │ │ ├── __init__.py │ │ │ │ ├── history.py │ │ │ │ ├── ipython.py │ │ │ │ └── merge.py │ │ │ ├── code_display.py │ │ │ ├── dataflow_model.py │ │ │ ├── dependency_graph │ │ │ │ ├── __init__.py │ │ │ │ ├── attributes.py │ │ │ │ ├── base_visitor.py │ │ │ │ ├── clusterizer.py │ │ │ │ ├── config.py │ │ │ │ ├── dot_visitor.py │ │ │ │ ├── filters.py │ │ │ │ ├── node_types.py │ │ │ │ ├── prov_visitor.py │ │ │ │ ├── search_visitor.py │ │ │ │ └── synonymers.py │ │ │ ├── dependency_querier │ │ │ │ ├── __init__.py │ │ │ │ ├── debug.py │ │ │ │ ├── node_context.py │ │ │ │ ├── querier.py │ │ │ │ └── querier_options.py │ │ │ ├── diff.py │ │ │ ├── graphs │ │ │ │ ├── __init__.py │ │ │ │ ├── diagram.py │ │ │ │ ├── diff_graph.py │ │ │ │ ├── history_graph.py │ │ │ │ ├── structures.py │ │ │ │ └── trial_graph.py │ │ │ ├── history.py │ │ │ ├── prov │ │ │ │ ├── __init__.py │ │ │ │ ├── export.py │ │ │ │ └── save_output.py │ │ │ └── trial_prolog.py │ │ ├── persistence │ │ │ ├── __init__.py │ │ │ ├── config.py │ │ │ ├── content │ │ │ │ ├── __init__.py │ │ │ │ ├── base.py │ │ │ │ ├── dulwich_engine.py │ │ │ │ ├── git_system.py │ │ │ │ ├── gitbase.py │ │ │ │ ├── gitdb_engine.py │ │ │ │ ├── parallel.py │ │ │ │ ├── plain_engine.py │ │ │ │ ├── puregit_engine.py │ │ │ │ ├── pygit_engine.py │ │ │ │ └── safeopen.py │ │ │ ├── content_database.py │ │ │ ├── lightweight.pxd │ │ │ ├── lightweight │ │ │ │ ├── __init__.py │ │ │ │ ├── activation.py │ │ │ │ ├── argument.py │ │ │ │ ├── base.py │ │ │ │ ├── bundle.py │ │ │ │ ├── code_block.py │ │ │ │ ├── code_component.py │ │ │ │ ├── composition.py │ │ │ │ ├── dependency.py │ │ │ │ ├── environment_attr.py │ │ │ │ ├── evaluation.py │ │ │ │ ├── exception.py │ │ │ │ ├── experiment.py │ │ │ │ ├── extendedAnnotation.py │ │ │ │ ├── file_access.py │ │ │ │ ├── group.py │ │ │ │ ├── member.py │ │ │ │ ├── memberOfGroup.py │ │ │ │ ├── module.py │ │ │ │ ├── remote.py │ │ │ │ ├── stage_tags.py │ │ │ │ ├── trial.py │ │ │ │ └── user.py │ │ │ ├── models │ │ │ │ ├── __init__.py │ │ │ │ ├── activation.py │ │ │ │ ├── argument.py │ │ │ │ ├── base.py │ │ │ │ ├── code_block.py │ │ │ │ ├── code_component.py │ │ │ │ ├── composition.py │ │ │ │ ├── dependency.py │ │ │ │ ├── environment_attr.py │ │ │ │ ├── evaluation.py │ │ │ │ ├── experiment.py │ │ │ │ ├── extendedAnnotation.py │ │ │ │ ├── file_access.py │ │ │ │ ├── graph_cache.py │ │ │ │ ├── group.py │ │ │ │ ├── head.py │ │ │ │ ├── member.py │ │ │ │ ├── memberOfGroup.py │ │ │ │ ├── module.py │ │ │ │ ├── relationships.py │ │ │ │ ├── remote.py │ │ │ │ ├── stage_tags.py │ │ │ │ ├── tag.py │ │ │ │ ├── trial.py │ │ │ │ └── user.py │ │ │ ├── relational_database.py │ │ │ └── serializers.py │ │ ├── tagging │ │ │ ├── __init__.py │ │ │ └── var_tagging.py │ │ ├── utils │ │ │ ├── __init__.py │ │ │ ├── collab.py │ │ │ ├── compression.py │ │ │ ├── cross_version.py │ │ │ ├── data.py │ │ │ ├── formatter.py │ │ │ ├── functions.py │ │ │ ├── future_cross_version.py │ │ │ ├── io.py │ │ │ ├── metaprofiler.py │ │ │ └── prolog.py │ │ └── vis │ │ │ ├── __init__.py │ │ │ ├── static │ │ │ ├── dist │ │ │ │ ├── 13d8dd6bab096d39d72e58cc572d0d5e.png │ │ │ │ ├── 5d5a80a1f26acd8f2b0b2185541ba2f5.png │ │ │ │ ├── 70faa0462a2ee32548d3.png │ │ │ │ ├── b47c5eefb3d150865f83.png │ │ │ │ ├── bundle.js │ │ │ │ ├── bundle.js.map │ │ │ │ ├── ce00730515ffc48dc3092a83ceaa47b5.png │ │ │ │ ├── config_widget.d.ts │ │ │ │ ├── d931ef5dd6f8edf07706d992a5f9c9b1.png │ │ │ │ ├── edd58499a4c99757478e.png │ │ │ │ ├── f657671c5aa8023560bc.png │ │ │ │ ├── graph │ │ │ │ │ ├── base_activation_graph.d.ts │ │ │ │ │ ├── diff_graph.d.ts │ │ │ │ │ ├── history_graph.d.ts │ │ │ │ │ └── trial_graph.d.ts │ │ │ │ ├── index.d.ts │ │ │ │ ├── info │ │ │ │ │ ├── diff_info.d.ts │ │ │ │ │ ├── environment_info.d.ts │ │ │ │ │ ├── file_accesses_info.d.ts │ │ │ │ │ ├── modules_info.d.ts │ │ │ │ │ └── trial_info.d.ts │ │ │ │ ├── nowpanel.d.ts │ │ │ │ └── project_widget.d.ts │ │ │ ├── external │ │ │ │ ├── Blob.js │ │ │ │ ├── FileSaver.min.js │ │ │ │ ├── jquery-1.11.1.min.js │ │ │ │ ├── jquery.splitter-0.14.0.js │ │ │ │ └── jquery.splitter.css │ │ │ └── font-awesome-4.7.0 │ │ │ │ ├── HELP-US-OUT.txt │ │ │ │ ├── css │ │ │ │ ├── font-awesome.css │ │ │ │ └── font-awesome.min.css │ │ │ │ ├── fonts │ │ │ │ ├── FontAwesome.otf │ │ │ │ ├── fontawesome-webfont.eot │ │ │ │ ├── fontawesome-webfont.svg │ │ │ │ ├── fontawesome-webfont.ttf │ │ │ │ ├── fontawesome-webfont.woff │ │ │ │ └── fontawesome-webfont.woff2 │ │ │ │ ├── less │ │ │ │ ├── animated.less │ │ │ │ ├── bordered-pulled.less │ │ │ │ ├── core.less │ │ │ │ ├── fixed-width.less │ │ │ │ ├── font-awesome.less │ │ │ │ ├── icons.less │ │ │ │ ├── larger.less │ │ │ │ ├── list.less │ │ │ │ ├── mixins.less │ │ │ │ ├── path.less │ │ │ │ ├── rotated-flipped.less │ │ │ │ ├── screen-reader.less │ │ │ │ ├── stacked.less │ │ │ │ └── variables.less │ │ │ │ └── scss │ │ │ │ ├── _animated.scss │ │ │ │ ├── _bordered-pulled.scss │ │ │ │ ├── _core.scss │ │ │ │ ├── _fixed-width.scss │ │ │ │ ├── _icons.scss │ │ │ │ ├── _larger.scss │ │ │ │ ├── _list.scss │ │ │ │ ├── _mixins.scss │ │ │ │ ├── _path.scss │ │ │ │ ├── _rotated-flipped.scss │ │ │ │ ├── _screen-reader.scss │ │ │ │ ├── _stacked.scss │ │ │ │ ├── _variables.scss │ │ │ │ └── font-awesome.scss │ │ │ ├── templates │ │ │ └── index.html │ │ │ └── views.py │ ├── patterns │ │ ├── __init__.py │ │ ├── machinery.py │ │ ├── models.py │ │ └── rules │ │ │ ├── __init__.py │ │ │ ├── access_rules.py │ │ │ ├── activation_rules.py │ │ │ ├── code_rules.py │ │ │ ├── docstring_rules.py │ │ │ ├── hash_rules.py │ │ │ ├── helpers.py │ │ │ ├── id_rules.py │ │ │ ├── mode_access_rules.py │ │ │ ├── name_rules.py │ │ │ ├── scope_rules.py │ │ │ ├── temporal_inference_rules.py │ │ │ └── timestamp_rules.py │ ├── resources │ │ ├── demo │ │ │ ├── 1 │ │ │ │ ├── step1 │ │ │ │ │ ├── data1.dat │ │ │ │ │ ├── data2.dat │ │ │ │ │ ├── simulation.py │ │ │ │ │ ├── simulation_complete.py │ │ │ │ │ └── simulator.py │ │ │ │ ├── step2 │ │ │ │ │ ├── data1.dat │ │ │ │ │ ├── data2.dat │ │ │ │ │ ├── simulation.py │ │ │ │ │ ├── simulation_complete.py │ │ │ │ │ └── simulator.py │ │ │ │ ├── step3 │ │ │ │ │ ├── data1.dat │ │ │ │ │ ├── data2.dat │ │ │ │ │ ├── simulation.py │ │ │ │ │ ├── simulation_complete.py │ │ │ │ │ └── simulator.py │ │ │ │ └── steps.txt │ │ │ ├── 2 │ │ │ │ ├── step1 │ │ │ │ │ ├── experiment.py │ │ │ │ │ ├── p13.dat │ │ │ │ │ ├── p14.dat │ │ │ │ │ └── precipitation.py │ │ │ │ ├── step2 │ │ │ │ │ ├── experiment.py │ │ │ │ │ ├── p12.dat │ │ │ │ │ ├── p13.dat │ │ │ │ │ ├── p14.dat │ │ │ │ │ └── precipitation.py │ │ │ │ ├── step3 │ │ │ │ │ ├── experiment.py │ │ │ │ │ ├── p12.dat │ │ │ │ │ ├── p13.dat │ │ │ │ │ ├── p14.dat │ │ │ │ │ └── precipitation.py │ │ │ │ ├── step4 │ │ │ │ │ ├── experiment.py │ │ │ │ │ ├── p13.dat │ │ │ │ │ ├── p14.dat │ │ │ │ │ └── precipitation.py │ │ │ │ ├── step5 │ │ │ │ │ ├── experiment.py │ │ │ │ │ ├── p12.dat │ │ │ │ │ ├── p13.dat │ │ │ │ │ ├── p14.dat │ │ │ │ │ └── precipitation.py │ │ │ │ └── steps.txt │ │ │ ├── 2016_ipaw_paper │ │ │ │ ├── step1 │ │ │ │ │ ├── anatomy1.hdr │ │ │ │ │ ├── anatomy1.img │ │ │ │ │ ├── anatomy2.hdr │ │ │ │ │ ├── anatomy2.img │ │ │ │ │ ├── anatomy3.hdr │ │ │ │ │ ├── anatomy3.img │ │ │ │ │ ├── anatomy4.hdr │ │ │ │ │ ├── anatomy4.img │ │ │ │ │ ├── experiment.py │ │ │ │ │ ├── external.py │ │ │ │ │ ├── reference.hdr │ │ │ │ │ └── reference.img │ │ │ │ ├── step2 │ │ │ │ │ ├── anatomy1.hdr │ │ │ │ │ ├── anatomy1.img │ │ │ │ │ ├── anatomy2.hdr │ │ │ │ │ ├── anatomy2.img │ │ │ │ │ ├── anatomy3.hdr │ │ │ │ │ ├── anatomy3.img │ │ │ │ │ ├── anatomy4.hdr │ │ │ │ │ ├── anatomy4.img │ │ │ │ │ ├── atlas.hdr │ │ │ │ │ ├── atlas.img │ │ │ │ │ ├── atlax-x.gif │ │ │ │ │ ├── atlax-x.pgm │ │ │ │ │ ├── atlax-y.gif │ │ │ │ │ ├── atlax-y.pgm │ │ │ │ │ ├── atlax-z.gif │ │ │ │ │ ├── atlax-z.pgm │ │ │ │ │ ├── convert.py │ │ │ │ │ ├── experiment.py │ │ │ │ │ ├── experiment2.py │ │ │ │ │ ├── external.py │ │ │ │ │ ├── reference.hdr │ │ │ │ │ ├── reference.img │ │ │ │ │ ├── reslice1.hdr │ │ │ │ │ ├── reslice1.img │ │ │ │ │ ├── reslice2.hdr │ │ │ │ │ ├── reslice2.img │ │ │ │ │ ├── reslice3.hdr │ │ │ │ │ ├── reslice3.img │ │ │ │ │ ├── reslice4.hdr │ │ │ │ │ ├── reslice4.img │ │ │ │ │ └── warp.warp │ │ │ │ ├── step3 │ │ │ │ │ ├── anatomy1.hdr │ │ │ │ │ ├── anatomy1.img │ │ │ │ │ ├── anatomy2.hdr │ │ │ │ │ ├── anatomy2.img │ │ │ │ │ ├── anatomy3.hdr │ │ │ │ │ ├── anatomy3.img │ │ │ │ │ ├── anatomy4.hdr │ │ │ │ │ ├── anatomy4.img │ │ │ │ │ ├── atlas.hdr │ │ │ │ │ ├── atlas.img │ │ │ │ │ ├── atlax-x.gif │ │ │ │ │ ├── atlax-x.jpg │ │ │ │ │ ├── atlax-x.pgm │ │ │ │ │ ├── atlax-x.ppm │ │ │ │ │ ├── atlax-y.gif │ │ │ │ │ ├── atlax-y.jpg │ │ │ │ │ ├── atlax-y.pgm │ │ │ │ │ ├── atlax-y.ppm │ │ │ │ │ ├── atlax-z.gif │ │ │ │ │ ├── atlax-z.jpg │ │ │ │ │ ├── atlax-z.pgm │ │ │ │ │ ├── atlax-z.ppm │ │ │ │ │ ├── convert.py │ │ │ │ │ ├── experiment.py │ │ │ │ │ ├── experiment2.py │ │ │ │ │ ├── external.py │ │ │ │ │ ├── reference.hdr │ │ │ │ │ ├── reference.img │ │ │ │ │ ├── reslice1.hdr │ │ │ │ │ ├── reslice1.img │ │ │ │ │ ├── reslice2.hdr │ │ │ │ │ ├── reslice2.img │ │ │ │ │ ├── reslice3.hdr │ │ │ │ │ ├── reslice3.img │ │ │ │ │ ├── reslice4.hdr │ │ │ │ │ ├── reslice4.img │ │ │ │ │ ├── result.txt │ │ │ │ │ └── warp.warp │ │ │ │ ├── step4 │ │ │ │ │ ├── anatomy1.hdr │ │ │ │ │ ├── anatomy1.img │ │ │ │ │ ├── anatomy2.hdr │ │ │ │ │ ├── anatomy2.img │ │ │ │ │ ├── anatomy3.hdr │ │ │ │ │ ├── anatomy3.img │ │ │ │ │ ├── anatomy4.hdr │ │ │ │ │ ├── anatomy4.img │ │ │ │ │ ├── atlas.hdr │ │ │ │ │ ├── atlas.img │ │ │ │ │ ├── atlax-x.gif │ │ │ │ │ ├── atlax-x.jpg │ │ │ │ │ ├── atlax-x.pgm │ │ │ │ │ ├── atlax-x.ppm │ │ │ │ │ ├── atlax-y.gif │ │ │ │ │ ├── atlax-y.jpg │ │ │ │ │ ├── atlax-y.pgm │ │ │ │ │ ├── atlax-y.ppm │ │ │ │ │ ├── atlax-z.gif │ │ │ │ │ ├── atlax-z.jpg │ │ │ │ │ ├── atlax-z.pgm │ │ │ │ │ ├── atlax-z.ppm │ │ │ │ │ ├── convert.py │ │ │ │ │ ├── experiment.py │ │ │ │ │ ├── experiment2.py │ │ │ │ │ ├── external.py │ │ │ │ │ ├── reference.hdr │ │ │ │ │ ├── reference.img │ │ │ │ │ ├── reslice1.hdr │ │ │ │ │ ├── reslice1.img │ │ │ │ │ ├── reslice2.hdr │ │ │ │ │ ├── reslice2.img │ │ │ │ │ ├── reslice3.hdr │ │ │ │ │ ├── reslice3.img │ │ │ │ │ ├── reslice4.hdr │ │ │ │ │ ├── reslice4.img │ │ │ │ │ ├── result.txt │ │ │ │ │ └── warp.warp │ │ │ │ ├── step5 │ │ │ │ │ ├── experiment2.py │ │ │ │ │ └── result.txt │ │ │ │ ├── step6 │ │ │ │ │ ├── experiment2.py │ │ │ │ │ └── result.txt │ │ │ │ └── steps.txt │ │ │ ├── 2016_scipyla │ │ │ │ ├── step1 │ │ │ │ │ └── noWorkflow.ipynb │ │ │ │ └── steps.txt │ │ │ └── annual_precipitation │ │ │ │ ├── step1 │ │ │ │ ├── experiment.py │ │ │ │ ├── p13.dat │ │ │ │ ├── p14.dat │ │ │ │ └── precipitation.py │ │ │ │ ├── step2 │ │ │ │ ├── experiment.py │ │ │ │ ├── out.png │ │ │ │ ├── p12.dat │ │ │ │ ├── p13.dat │ │ │ │ ├── p14.dat │ │ │ │ └── precipitation.py │ │ │ │ ├── step3 │ │ │ │ ├── experiment.py │ │ │ │ ├── out.png │ │ │ │ ├── p12.dat │ │ │ │ ├── p13.dat │ │ │ │ ├── p14.dat │ │ │ │ ├── p15.dat │ │ │ │ └── precipitation.py │ │ │ │ ├── step4 │ │ │ │ ├── experiment.py │ │ │ │ ├── p12.dat │ │ │ │ ├── p13.dat │ │ │ │ ├── p14.dat │ │ │ │ ├── p15.dat │ │ │ │ └── precipitation.py │ │ │ │ └── steps.txt │ │ ├── helper │ │ │ └── df_style.py │ │ ├── rules.pl │ │ └── version.txt │ └── tests │ │ ├── __init__.py │ │ ├── collection_testcase.py │ │ ├── cross_version_test.py │ │ ├── dependency │ │ ├── __init__.py │ │ ├── test_activation_clusterizer.py │ │ ├── test_clusterizer_config.py │ │ ├── test_default_clusterizer.py │ │ ├── test_dependency_clusterizer.py │ │ └── test_prospective_clusterizer.py │ │ ├── examples │ │ ├── modules.py │ │ └── script.py │ │ ├── helpers │ │ ├── __init__.py │ │ └── models.py │ │ ├── prov_definition │ │ ├── __init__.py │ │ ├── test_code_block_definition.py │ │ ├── test_code_component_definition.py │ │ └── test_reconstruction.py │ │ └── prov_execution │ │ ├── __init__.py │ │ ├── test_class_execution.py │ │ ├── test_depth_execution.py │ │ ├── test_expr_execution.py │ │ ├── test_script.py │ │ └── test_stmt_execution.py ├── run_tests.py ├── setup.cfg └── setup.py ├── docs ├── Disserta__o___Eduardo_Jandre.pdf ├── ast.rtf ├── info.txt ├── ipaw2014.pdf ├── ipaw2014.pptx ├── ipaw2016a.pdf ├── ipaw2016a_presentation.pdf ├── ipaw2016a_presentation.pptx ├── ipaw2016b.pdf ├── ipaw2016b_lightning_talk.pdf ├── ipaw2016b_lightning_talk.pptx ├── ipaw2016b_poster.pptx ├── ipaw2016c.pdf ├── ipaw2016c_lightning_talk.pdf ├── keynote bresci 2017.pdf ├── noworkflow.pptx ├── spec.txt ├── tapp2015.pdf ├── tapp2015.pptx ├── tapp_2015_poster.pptx ├── tcc-vynicius.pdf └── vldb2017.pdf ├── history ├── GenerateGraph.ipynb ├── config.py ├── config_elements.py ├── david.jpg ├── fernando.jpg ├── generate_timeline.py ├── history.png ├── history.svg ├── history.zip ├── joao.jpg ├── juliana.jpg ├── leo.jpg ├── package-lock.json ├── paper.png ├── svgwrite_title.py └── vanessa.jpg ├── npm ├── development.md ├── lerna.json ├── package-lock.json ├── package.json ├── packages │ ├── history │ │ ├── package.json │ │ ├── src │ │ │ ├── config.ts │ │ │ ├── graph.ts │ │ │ ├── index.ts │ │ │ └── structures.ts │ │ ├── style │ │ │ └── index.css │ │ └── tsconfig.json │ ├── labextension │ │ ├── .copier-answers.yml │ │ ├── .gitignore │ │ ├── .prettierignore │ │ ├── .yarnrc.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── RELEASE.md │ │ ├── install.json │ │ ├── noworkflow_labextension │ │ │ └── __init__.py │ │ ├── package.json │ │ ├── pyproject.toml │ │ ├── setup.py │ │ ├── src │ │ │ ├── coderenderer.ts │ │ │ ├── historyrenderer.ts │ │ │ ├── index.ts │ │ │ └── trialrenderer.ts │ │ ├── style │ │ │ ├── base.css │ │ │ ├── index.css │ │ │ └── index.js │ │ └── tsconfig.json │ ├── nowvis │ │ ├── package.json │ │ ├── src │ │ │ ├── annotation_widget.ts │ │ │ ├── config_widget.ts │ │ │ ├── graph │ │ │ │ ├── base_activation_graph.ts │ │ │ │ ├── diff_graph.ts │ │ │ │ ├── function_diff.ts │ │ │ │ ├── history_graph.ts │ │ │ │ └── trial_graph.ts │ │ │ ├── group_widget.ts │ │ │ ├── index.ts │ │ │ ├── info │ │ │ │ ├── diff_info.ts │ │ │ │ ├── environment_info.ts │ │ │ │ ├── file_accesses_info.ts │ │ │ │ ├── modules_info.ts │ │ │ │ ├── structures.ts │ │ │ │ └── trial_info.ts │ │ │ ├── nowpanel.ts │ │ │ └── project_widget.ts │ │ ├── style │ │ │ ├── bootstrap.min.css │ │ │ ├── history.css │ │ │ ├── index.css │ │ │ ├── panel.css │ │ │ └── trial.css │ │ ├── tsconfig.json │ │ └── webpack.config.js │ ├── trial │ │ ├── package.json │ │ ├── src │ │ │ ├── config.ts │ │ │ ├── graph.ts │ │ │ ├── index.ts │ │ │ └── structures.ts │ │ ├── style │ │ │ └── index.css │ │ └── tsconfig.json │ └── utils │ │ ├── package.json │ │ ├── src │ │ ├── d3svg.ts │ │ ├── index.ts │ │ ├── random.ts │ │ ├── text.ts │ │ └── web.ts │ │ ├── style │ │ └── shared.css │ │ └── tsconfig.json └── watch.py ├── readme_images ├── annotation experiment.png ├── annotation_add.png ├── annotation_success.png ├── collab_add_experiment.png ├── collab_add_experiment_success.png ├── collab_add_group.png ├── collab_add_group_member.png ├── collab_delete_group.png ├── collab_group_success.png ├── collab_group_tab.png ├── collab_main_page.png └── trial_annotations.png ├── temp_transformer ├── alternative.py ├── ast35.txt ├── now.py ├── test.py └── todo.txt ├── tests ├── Test.ipynb ├── call_example.py ├── definition_provenance.py ├── example1.py ├── example2.py ├── fibonacci.py ├── happy_numbers │ ├── Graphs.ipynb │ ├── experiment.py │ ├── external.py │ ├── happy.png │ ├── happy1A.py │ ├── happy1B.py │ ├── happy2.py │ ├── maybe_happy_2pow4000.py │ ├── result.csv │ ├── result2.csv │ ├── result3.csv │ ├── slow.png │ └── slow.py ├── t1.py ├── t2.py ├── t3.py ├── tapp │ ├── Complex Paper Analysis │ │ ├── .temp.dat │ │ ├── Complex Analysis.ipynb │ │ ├── experiment.py │ │ └── extractor │ ├── Main Paper Example │ │ ├── .temp.dat │ │ ├── Collection.ipynb │ │ ├── Complex Poster.ipynb │ │ ├── Visualization and analysis.ipynb │ │ ├── extractor │ │ ├── script1.py │ │ ├── script2.py │ │ ├── y.txt │ │ └── z.txt │ └── Presentation │ │ ├── Backup.ipynb │ │ ├── Collect Provenance 1.ipynb │ │ ├── Experiment1-noworkflow.ipynb │ │ ├── Experiment1.ipynb │ │ ├── Experiment2-noworkflow.ipynb │ │ ├── Experiment2.ipynb │ │ ├── Full Expirement - noworkflow.ipynb │ │ ├── Provenance Analysis.ipynb │ │ ├── experiment.py │ │ ├── experiment2.py │ │ ├── out.png │ │ ├── p12.dat │ │ ├── p13.dat │ │ ├── p14.dat │ │ └── precipitation.py ├── test_async_py35.py ├── test_cfunc.py ├── test_decorator.py ├── test_disasm.py ├── test_exception.py ├── test_func.py ├── test_loop_1.py ├── test_loop_2.py ├── test_loop_3.py ├── test_loop_4.py ├── test_loop_5.py ├── test_metaclass_py3.py ├── test_noreturn_func.py ├── test_slow.py ├── test_var.py ├── test_var_loop.py ├── test_with.py ├── test_yield.py └── weather │ ├── data1.dat │ ├── data2.dat │ ├── simulation.py │ ├── simulation_complete.py │ ├── simulation_dummy.py │ └── simulator.py └── wiki_images ├── begin1.png ├── begin2.png ├── begin3.png ├── exportdataflow1.png ├── exportdataflow2.png ├── exportdataflow3.png ├── exportprolog1.png ├── exportprolog2.png ├── exportprolog3.png ├── exportprolog4.png ├── exportprov1.png ├── exportprov2.png └── wikipageimage.png /.mailmap: -------------------------------------------------------------------------------- 1 | # 2 | # List used by git-shortlog to fix different spellings of the same names 3 | # 4 | 5 | João Felipe Pimentel 6 | João Felipe Pimentel 7 | Leonardo Murta 8 | Leonardo Murta 9 | Leonardo Murta Leonardo Gresta Paulino Murta 10 | Vanessa Braganholo 11 | Vanessa Braganholo 12 | Vanessa Braganholo Vanessa Braganholo Murta 13 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | No Workflow 4 | 5 | 6 | 7 | 8 | 9 | org.python.pydev.PyDevBuilder 10 | 11 | 12 | 13 | 14 | 15 | org.python.pydev.pythonNature 16 | 17 | 18 | -------------------------------------------------------------------------------- /.pydevproject: -------------------------------------------------------------------------------- 1 | 2 | 3 | python 2.7 4 | Default 5 | 6 | /${PROJECT_DIR_NAME}/capture 7 | 8 | 9 | -------------------------------------------------------------------------------- /Examples/Fat/fat.py: -------------------------------------------------------------------------------- 1 | 2 | def fat(n): 3 | if n == 0 or n == 1: 4 | return 1 5 | return n * fat(n-1) 6 | # for i in range (1,n): 7 | # resp += i *1 8 | # saida = open("saida.txt","wt"): 9 | # saida.write(resp) 10 | # saida.close 11 | # return resp 12 | 13 | fat(5) 14 | -------------------------------------------------------------------------------- /Examples/demo_1/output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/Examples/demo_1/output.png -------------------------------------------------------------------------------- /Examples/demo_1/simulation.py: -------------------------------------------------------------------------------- 1 | import csv 2 | import sys 3 | import matplotlib.pyplot as plt 4 | from simulator import simulate 5 | 6 | def run_simulation(data_a, data_b): 7 | a = csv_read(data_a) 8 | b = csv_read(data_b) 9 | data = simulate(a, b) 10 | return data 11 | 12 | def csv_read(f): 13 | reader = csv.reader(open(f, 'rU'), delimiter=':') 14 | data = [] 15 | for row in reader: 16 | data.append(row) 17 | return data 18 | 19 | def extract_column(data, column): 20 | col_data = [] 21 | for row in data: 22 | col_data.append(float(row[column])) 23 | return col_data 24 | 25 | def plot(data): 26 | #GetTemperature 27 | t = extract_column(data, 0) 28 | #GetPrecipitation 29 | p = extract_column(data, 1) 30 | plt.scatter(t, p, marker='o') 31 | plt.xlabel('Temperature') 32 | plt.ylabel('Precipitation') 33 | plt.savefig("output.png") 34 | 35 | #Main Program 36 | data_a = sys.argv[1] 37 | data_b = sys.argv[2] 38 | data = run_simulation(data_a, data_b) 39 | plot(data) 40 | -------------------------------------------------------------------------------- /Examples/demo_1/simulator.py: -------------------------------------------------------------------------------- 1 | import time 2 | 3 | def simulate(a, b): 4 | time.sleep(2) 5 | data = a + b 6 | return data 7 | -------------------------------------------------------------------------------- /Examples/usecase_credit_fraud/dataset/README.txt: -------------------------------------------------------------------------------- 1 | Please, refer to this link to download the dataset for this example https://www.kaggle.com/datasets/mlg-ulb/creditcardfraud 2 | -------------------------------------------------------------------------------- /Examples/usecase_credit_fraud/images/backward_deps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/Examples/usecase_credit_fraud/images/backward_deps.png -------------------------------------------------------------------------------- /Examples/usecase_credit_fraud/images/resume_trials.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/Examples/usecase_credit_fraud/images/resume_trials.png -------------------------------------------------------------------------------- /Examples/usecase_credit_fraud/images/tag_values_f1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/Examples/usecase_credit_fraud/images/tag_values_f1.png -------------------------------------------------------------------------------- /Examples/usecase_credit_fraud/images/tag_values_model.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/Examples/usecase_credit_fraud/images/tag_values_model.png -------------------------------------------------------------------------------- /Examples/usecase_credit_fraud/images/tag_values_roc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/Examples/usecase_credit_fraud/images/tag_values_roc.png -------------------------------------------------------------------------------- /Examples/usecase_credit_fraud/images/trial_diff.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/Examples/usecase_credit_fraud/images/trial_diff.png -------------------------------------------------------------------------------- /Examples/usecase_credit_fraud/images/trial_intersect_diff.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/Examples/usecase_credit_fraud/images/trial_intersect_diff.png -------------------------------------------------------------------------------- /Examples/usecase_credit_fraud/images/var_tag_plot_f1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/Examples/usecase_credit_fraud/images/var_tag_plot_f1.png -------------------------------------------------------------------------------- /Examples/usecase_credit_fraud/images/var_tag_plot_roc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/Examples/usecase_credit_fraud/images/var_tag_plot_roc.png -------------------------------------------------------------------------------- /Examples/usecase_credit_fraud/ops.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/Examples/usecase_credit_fraud/ops.db -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013 Universidade Federal Fluminense (UFF), Polytechnic Institute of New York University. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | title: noWorkflow 2 | description: Supporting infrastructure to run scientific experiments without a scientific workflow management system. 3 | theme: jekyll-theme-cayman 4 | -------------------------------------------------------------------------------- /capture/.gitignore: -------------------------------------------------------------------------------- 1 | /cache.db 2 | -------------------------------------------------------------------------------- /capture/noworkflow/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2016 Universidade Federal Fluminense (UFF) 2 | # Copyright (c) 2016 Polytechnic Institute of New York University. 3 | # This file is part of noWorkflow. 4 | # Please, consult the license terms in the LICENSE file. 5 | 6 | from __future__ import (absolute_import, print_function, 7 | division, unicode_literals) 8 | """ 9 | Supporting infrastructure to run scientific experiments without a 10 | scientific workflow management system. 11 | """ 12 | from noworkflow.now.cmd import main 13 | from noworkflow.now.utils.functions import version 14 | 15 | 16 | def load_ipython_extension(ipython): 17 | from .now.ipython import init 18 | init(ipython=ipython) 19 | 20 | 21 | 22 | 23 | if __name__ == "__main__": 24 | main() 25 | 26 | __version__ = version() 27 | -------------------------------------------------------------------------------- /capture/noworkflow/__main__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2016 Universidade Federal Fluminense (UFF) 2 | # Copyright (c) 2016 Polytechnic Institute of New York University. 3 | # This file is part of noWorkflow. 4 | # Please, consult the license terms in the LICENSE file. 5 | 6 | from __future__ import (absolute_import, print_function, 7 | division, unicode_literals) 8 | 9 | 10 | from noworkflow.now.cmd import main 11 | 12 | main() 13 | -------------------------------------------------------------------------------- /capture/noworkflow/kernel/__main__.py: -------------------------------------------------------------------------------- 1 | from .nowkernel import NowKernel 2 | 3 | if __name__ == '__main__': 4 | from ipykernel import kernelapp as app 5 | app.launch_new_instance(kernel_class=NowKernel) -------------------------------------------------------------------------------- /capture/noworkflow/kernel/nowkernel.py: -------------------------------------------------------------------------------- 1 | import re 2 | from ipykernel.ipkernel import IPythonKernel 3 | from .shell import OverrideShell 4 | 5 | 6 | class NowKernel(IPythonKernel): 7 | 8 | def __init__(self, **kwargs): 9 | super(NowKernel, self).__init__(**kwargs) 10 | OverrideShell(self.shell) 11 | 12 | def do_execute(self, code, silent, store_history=True, 13 | user_expressions=None, allow_stdin=False): 14 | reply_content = super(NowKernel, self).do_execute( 15 | code, silent, store_history=store_history, 16 | user_expressions=user_expressions, allow_stdin=allow_stdin) 17 | return reply_content 18 | -------------------------------------------------------------------------------- /capture/noworkflow/now/__init__.py: -------------------------------------------------------------------------------- 1 | """Main noWorkflow module 2 | Provide access to all features 3 | """ 4 | -------------------------------------------------------------------------------- /capture/noworkflow/now/cmd/cmd_debug.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2016 Universidade Federal Fluminense (UFF) 2 | # Copyright (c) 2016 Polytechnic Institute of New York University. 3 | # This file is part of noWorkflow. 4 | # Please, consult the license terms in the LICENSE file. 5 | """'now debug' command""" 6 | from __future__ import (absolute_import, print_function, 7 | division, unicode_literals) 8 | 9 | from .cmd_run import Run 10 | 11 | 12 | class Debug(Run): 13 | """Debug a script collecting its provenance 14 | This command is similar to Run, but defines different variables""" 15 | 16 | def __init__(self, *args, **kwargs): 17 | super(Debug, self).__init__(*args, **kwargs) 18 | self.default_context = "package" 19 | self.default_call_storage_frequency = 1 20 | self.default_save_frequency = 1000 21 | -------------------------------------------------------------------------------- /capture/noworkflow/now/cmd/cmd_gc.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2016 Universidade Federal Fluminense (UFF) 2 | # Copyright (c) 2016 Polytechnic Institute of New York University. 3 | # This file is part of noWorkflow. 4 | # Please, consult the license terms in the LICENSE file. 5 | """"now list" command""" 6 | from __future__ import (absolute_import, print_function, 7 | division, unicode_literals) 8 | 9 | import os 10 | 11 | from ..persistence.models import Trial 12 | from ..persistence import persistence_config 13 | from ..utils.io import print_msg 14 | from ..persistence import content 15 | 16 | from .command import Command 17 | 18 | 19 | class GC(Command): 20 | """Executes the git garbage collection in the content database""" 21 | 22 | def add_arguments(self): 23 | add_arg = self.add_argument 24 | add_arg("--dir", type=str, 25 | help="set project path where is the database. Default to " 26 | "current directory") 27 | add_arg("-agg", "--aggressive", action="store_true", 28 | help="executes aggressively the garbage collection in the content database") 29 | add_arg("--content-engine", type=str, 30 | help="set the content database engine") 31 | 32 | def execute(self, args): 33 | persistence_config.content_engine = args.content_engine 34 | persistence_config.connect_existing(args.dir or os.getcwd()) 35 | content.gc() 36 | -------------------------------------------------------------------------------- /capture/noworkflow/now/cmd/cmd_helper.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2016 Universidade Federal Fluminense (UFF) 2 | # Copyright (c) 2016 Polytechnic Institute of New York University. 3 | # This file is part of noWorkflow. 4 | # Please, consult the license terms in the LICENSE file. 5 | """'now helper' command""" 6 | from __future__ import (absolute_import, print_function, 7 | division, unicode_literals) 8 | 9 | import os 10 | import subprocess 11 | import sys 12 | 13 | from ..utils.functions import resource, resource_ls 14 | from ..utils.functions import recursive_copy, erase 15 | 16 | 17 | from .command import Command 18 | 19 | 20 | HELPER = "../resources/helper" 21 | 22 | 23 | class Helper(Command): 24 | """Create a Helper for noWorkflow usage""" 25 | 26 | def add_arguments(self): 27 | add_arg = self.add_argument 28 | choices = sorted(list(resource_ls(HELPER))) 29 | add_arg("id", type=str, nargs="?", choices=choices, 30 | help="helper identification") 31 | add_arg("--dir", type=str, 32 | help="set helper path. Default to CWD/" 33 | "where is the helper identification") 34 | 35 | def execute(self, args): 36 | directory = "{}".format(args.id) 37 | if args.dir: 38 | directory = args.dir 39 | if not args.id: 40 | print("Please specify the helper!") 41 | sys.exit(1) 42 | print("Creating Helper {}".format(args.id)) 43 | helper_path = os.path.join(HELPER, args.id) 44 | recursive_copy(helper_path, directory) 45 | -------------------------------------------------------------------------------- /capture/noworkflow/now/cmd/cmd_prov.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2016 Universidade Federal Fluminense (UFF) 2 | # Copyright (c) 2016 Polytechnic Institute of New York University. 3 | # This file is part of noWorkflow. 4 | # Please, consult the license terms in the LICENSE file. 5 | """'now export'command""" 6 | from __future__ import (absolute_import, print_function, 7 | division, unicode_literals) 8 | 9 | import os 10 | 11 | from argparse import Namespace 12 | 13 | from ..persistence.models import Trial 14 | from ..persistence import persistence_config 15 | 16 | 17 | from .command import Command 18 | from .cmd_diff import Diff 19 | from .cmd_history import History 20 | from .cmd_show import Show 21 | 22 | from ..models.prov.export import export_prov 23 | 24 | 25 | class Prov(Command): 26 | """Export the collected provenance of a trial to Prov""" 27 | 28 | def add_arguments(self): 29 | add_arg = self.add_argument 30 | add_arg("trial", type=str, nargs="?", 31 | help="trial id or none for last trial. If you are generation " 32 | "ipython notebook files, it is also possible to use " 33 | "'history' or 'diff::'") 34 | add_arg("--dir", type=str, 35 | help="set project path where is the database. Default to " 36 | "current directory") 37 | 38 | def execute(self, args): 39 | persistence_config.connect_existing(args.dir or os.getcwd()) 40 | trial = Trial(trial_ref=args.trial) 41 | output = export_prov(trial) 42 | print(output) 43 | -------------------------------------------------------------------------------- /capture/noworkflow/now/collection/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/capture/noworkflow/now/collection/__init__.py -------------------------------------------------------------------------------- /capture/noworkflow/now/collection/prov_definition/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/capture/noworkflow/now/collection/prov_definition/__init__.py -------------------------------------------------------------------------------- /capture/noworkflow/now/collection/prov_deployment/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/capture/noworkflow/now/collection/prov_deployment/__init__.py -------------------------------------------------------------------------------- /capture/noworkflow/now/collection/prov_execution/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/capture/noworkflow/now/collection/prov_execution/__init__.py -------------------------------------------------------------------------------- /capture/noworkflow/now/ipython/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2016 Universidade Federal Fluminense (UFF) 2 | # Copyright (c) 2016 Polytechnic Institute of New York University. 3 | # This file is part of noWorkflow. 4 | # Please, consult the license terms in the LICENSE file. 5 | """IPython Module""" 6 | from __future__ import (absolute_import, print_function, 7 | division) 8 | 9 | from .defaults import set_default 10 | from ..persistence.models import * # pylint: disable=wildcard-import 11 | from ..persistence import persistence_config, relational, content 12 | from ..models.history import History 13 | from ..models.diff import Diff 14 | from ... import patterns 15 | 16 | 17 | def init(path=None, ipython=None): 18 | """Initiate noWorkflow extension. 19 | Load D3, IPython magics, and connect to database 20 | 21 | 22 | Keyword Arguments: 23 | path -- database path (default=current directory) 24 | ipython -- IPython object (default=None) 25 | """ 26 | 27 | import os 28 | from .magics import register_magics 29 | from .dotmagic import load_ipython_extension as load_dot 30 | load_dot(ipython) 31 | register_magics(ipython) 32 | 33 | if path is None: 34 | path = os.getcwd() 35 | persistence_config.connect(path) 36 | 37 | return u"ok" 38 | -------------------------------------------------------------------------------- /capture/noworkflow/now/ipython/defaults.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021 Universidade Federal Fluminense (UFF) 2 | # Copyright (c) 2021 Polytechnic Institute of New York University. 3 | # This file is part of noWorkflow. 4 | # Please, consult the license terms in the LICENSE file. 5 | 6 | from ..persistence.models import MetaModel 7 | 8 | def set_default(key, value, model="*"): 9 | """Set a default metamodel value""" 10 | if isinstance(value, str) and value.isdigit(): 11 | value = int(value) 12 | MetaModel.set_classes_default(key, value, model=model) 13 | -------------------------------------------------------------------------------- /capture/noworkflow/now/ipython/magics/now_ipython.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2016 Universidade Federal Fluminense (UFF) 2 | # Copyright (c) 2016 Polytechnic Institute of New York University. 3 | # This file is part of noWorkflow. 4 | # Please, consult the license terms in the LICENSE file. 5 | """'%now_ip' magic""" 6 | from __future__ import (absolute_import, print_function, 7 | division, unicode_literals) 8 | 9 | from .command import IpythonCommandMagic 10 | 11 | 12 | class NowIpython(IpythonCommandMagic): 13 | """Return the noWorkflow IPython Module 14 | 15 | Equivalent to: 16 | In [1]: import noworkflow.now.ipython as nip 17 | ...: nip 18 | """ 19 | 20 | def execute(self, func, line, cell, magic_cls): 21 | from ... import ipython as nip 22 | return nip 23 | -------------------------------------------------------------------------------- /capture/noworkflow/now/ipython/magics/now_ls_magic.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2016 Universidade Federal Fluminense (UFF) 2 | # Copyright (c) 2016 Polytechnic Institute of New York University. 3 | # This file is part of noWorkflow. 4 | # Please, consult the license terms in the LICENSE file. 5 | """'%now_ls_magic' magic""" 6 | from __future__ import (absolute_import, print_function, 7 | division, unicode_literals) 8 | 9 | from ...utils.formatter import PrettyLines 10 | from .command import IpythonCommandMagic 11 | 12 | 13 | class NowLsMagic(IpythonCommandMagic): 14 | """Return the list of noWorkflow magics""" 15 | 16 | def execute(self, func, line, cell, magic_cls): 17 | cline, ccell = "%", "%%" 18 | magics = magic_cls.now_magics 19 | out = ["Line magics:", 20 | cline + (" " + cline).join(sorted(magics["line"])), 21 | "", 22 | "Cell magics:", 23 | ccell + (" " + ccell).join(sorted(magics["cell"]))] 24 | return PrettyLines(out) 25 | -------------------------------------------------------------------------------- /capture/noworkflow/now/ipython/magics/now_set_default.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2016 Universidade Federal Fluminense (UFF) 2 | # Copyright (c) 2016 Polytechnic Institute of New York University. 3 | # This file is part of noWorkflow. 4 | # Please, consult the license terms in the LICENSE file. 5 | """'%now_set_default' magic""" 6 | from __future__ import (absolute_import, print_function, 7 | division, unicode_literals) 8 | 9 | import re 10 | import argparse 11 | 12 | from future.utils import viewkeys 13 | 14 | from ...persistence.models import MetaModel 15 | from ..defaults import set_default 16 | 17 | from .command import IpythonCommandMagic 18 | 19 | 20 | class NowSetDefault(IpythonCommandMagic): 21 | """Set default values on Models 22 | 23 | Examples 24 | -------- 25 | :: 26 | In [1]: %now_set_default graph.width=200 graph.height=200 27 | 28 | In [2]: %now_set_default --model History graph_height=100 29 | """ 30 | 31 | def add_arguments(self): 32 | super(NowSetDefault, self).add_arguments() 33 | add_arg = self.add_argument 34 | add_arg("--model", type=str, default="*", 35 | choices=["*"] + list(viewkeys(MetaModel.__classes__)), 36 | help="""specifies the model""") 37 | add_arg("defaults", nargs=argparse.REMAINDER, 38 | help="Default assingments. Use the format var=value") 39 | 40 | def execute(self, func, line, cell, magic_cls): 41 | pattern = re.compile(r"\s*(?P[\w\.]+)\s*=\s*(?P\w+)\s*") 42 | _, args = self.arguments(func, line) 43 | for match in pattern.finditer(" ".join(args.defaults)): 44 | set_default(match.group("left"), match.group("right"), args.model) 45 | -------------------------------------------------------------------------------- /capture/noworkflow/now/models/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/capture/noworkflow/now/models/__init__.py -------------------------------------------------------------------------------- /capture/noworkflow/now/models/ast/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2017 Universidade Federal Fluminense (UFF) 2 | # Copyright (c) 2017 Polytechnic Institute of New York University. 3 | # This file is part of noWorkflow. 4 | # Please, consult the license terms in the LICENSE file. 5 | """Operations to work with AST reconstructed from 6 | CodeComponents and Compositions""" 7 | 8 | from .model import NowNode 9 | from .constructor import create_trees, component_to_tree 10 | from .base_visitor import NodeVisitor 11 | from .draw_visitor import DrawVisitor 12 | from .code_writer import CodeWriter 13 | -------------------------------------------------------------------------------- /capture/noworkflow/now/models/ast/base_visitor.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2017 Universidade Federal Fluminense (UFF) 2 | # Copyright (c) 2017 Polytechnic Institute of New York University. 3 | # This file is part of noWorkflow. 4 | # Please, consult the license terms in the LICENSE file. 5 | """Base visitor for reconstructed AST trees""" 6 | 7 | from .model import NowNode 8 | 9 | 10 | class NodeVisitor(object): 11 | """Base visitor""" 12 | 13 | def visit(self, node): 14 | """Visit a node. Dispatches visitor function""" 15 | func = getattr( 16 | self, "visit_{}".format(node.type), 17 | self.generic_visit 18 | ) 19 | func(node) 20 | 21 | def generic_visit(self, node): 22 | """Calls visit() on all children of the node""" 23 | for attr in dir(node): 24 | value = getattr(node, attr) 25 | if isinstance(value, list): 26 | for child in value: 27 | self.visit(child) 28 | elif isinstance(value, NowNode): 29 | self.visit(value) 30 | -------------------------------------------------------------------------------- /capture/noworkflow/now/models/cleaning/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021 Universidade Federal Fluminense (UFF) 2 | # Copyright (c) 2021 Polytechnic Institute of New York University. 3 | # This file is part of noWorkflow. 4 | # Please, consult the license terms in the LICENSE file. 5 | 6 | from .history import get_cells, create_clean, create_merged_from_cells -------------------------------------------------------------------------------- /capture/noworkflow/now/models/dependency_graph/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/capture/noworkflow/now/models/dependency_graph/__init__.py -------------------------------------------------------------------------------- /capture/noworkflow/now/models/dependency_graph/base_visitor.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2017 Universidade Federal Fluminense (UFF) 2 | # Copyright (c) 2017 Polytechnic Institute of New York University. 3 | # This file is part of noWorkflow. 4 | # Please, consult the license terms in the LICENSE file. 5 | """Base Cluster Visitor""" 6 | 7 | from .node_types import AccessNode 8 | from .node_types import ActivationNode, ClusterNode, EvaluationNode 9 | from .clusterizer import Clusterizer 10 | 11 | class ClusterVisitor(object): 12 | """Base Cluster Visitor""" 13 | 14 | def __init__(self, clusterizer): 15 | self.clusterizer = clusterizer 16 | self.visitors = { 17 | ClusterNode: self.visit_cluster, 18 | EvaluationNode: self.visit_evaluation, 19 | ActivationNode: self.visit_activation, 20 | AccessNode: self.visit_access, 21 | } 22 | self.dependencies = clusterizer.dependencies 23 | 24 | def visit(self, node, initial=False): 25 | """Visit node""" 26 | if isinstance(node, Clusterizer): 27 | return self.visit_initial(node.main_cluster) 28 | if initial: 29 | return self.visit_initial(node) 30 | return self.visitors.get(type(node), self.visit_else)(node) 31 | 32 | def visit_default(self, node): 33 | """Visit default""" 34 | pass 35 | 36 | def _default_visitor(self, node): 37 | """Visit default""" 38 | return self.visit_default(node) 39 | 40 | visit_cluster = _default_visitor 41 | visit_initial = _default_visitor 42 | visit_evaluation = _default_visitor 43 | visit_activation = _default_visitor 44 | visit_access = _default_visitor 45 | visit_else = _default_visitor 46 | -------------------------------------------------------------------------------- /capture/noworkflow/now/models/dependency_graph/search_visitor.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2019 Universidade Federal Fluminense (UFF) 2 | # Copyright (c) 2019 Polytechnic Institute of New York University. 3 | # This file is part of noWorkflow. 4 | # Please, consult the license terms in the LICENSE file. 5 | """Search Visitor""" 6 | from .base_visitor import ClusterVisitor 7 | 8 | class SearchEvaluationVisitor(ClusterVisitor): 9 | """Search evaluation in cluster""" 10 | 11 | def __init__(self, clusterizer, evaluation_id): 12 | super(SearchEvaluationVisitor, self).__init__(clusterizer) 13 | self.evaluation_id = evaluation_id 14 | 15 | def visit_initial(self, cluster): 16 | return self.visit_cluster(cluster) 17 | 18 | def visit_cluster(self, cluster): 19 | if cluster.evaluation.id == self.evaluation_id: 20 | return cluster 21 | for node in cluster.elements: 22 | result = self.visit(node) 23 | if result: 24 | return result 25 | 26 | def visit_evaluation(self, node): 27 | if node.evaluation.id == self.evaluation_id: 28 | return node 29 | 30 | def visit_activation(self, node): 31 | if node.evaluation.id == self.evaluation_id: 32 | return node 33 | -------------------------------------------------------------------------------- /capture/noworkflow/now/models/dependency_querier/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021 Universidade Federal Fluminense (UFF) 2 | # Copyright (c) 2021 Polytechnic Institute of New York University. 3 | # This file is part of noWorkflow. 4 | # Please, consult the license terms in the LICENSE file. 5 | """Trial dependency queriers""" 6 | 7 | from .querier import DependencyQuerier 8 | from .querier_options import QuerierOptions, PreloadedQuerierOptions -------------------------------------------------------------------------------- /capture/noworkflow/now/models/graphs/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/capture/noworkflow/now/models/graphs/__init__.py -------------------------------------------------------------------------------- /capture/noworkflow/now/models/prov/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/capture/noworkflow/now/models/prov/__init__.py -------------------------------------------------------------------------------- /capture/noworkflow/now/models/prov/save_output.py: -------------------------------------------------------------------------------- 1 | 2 | class SaveOutput(object): 3 | 4 | def __init__(self, name="temp", formats="svg"): 5 | self.name = name 6 | self.formats = formats 7 | self.lines = [] 8 | 9 | def __call__(self, *text): 10 | self.lines.append(" ".join(map(str, text))) 11 | 12 | def _repr_svg_(self): 13 | from IPython import get_ipython 14 | return get_ipython().run_cell_magic( 15 | "provn", "-o {} -e {}".format(self.name, self.formats), 16 | self.text 17 | ).data 18 | 19 | def __str__(self): 20 | return self.text 21 | 22 | def save(self): 23 | with open(self.name + ".provn", "w") as f: 24 | f.write(self.text) 25 | 26 | @property 27 | def text(self): 28 | return "\n".join(self.lines) 29 | -------------------------------------------------------------------------------- /capture/noworkflow/now/persistence/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2016 Universidade Federal Fluminense (UFF) 2 | # Copyright (c) 2016 Polytechnic Institute of New York University. 3 | # This file is part of noWorkflow. 4 | # Please, consult the license terms in the LICENSE file. 5 | """Persistence Module. Perform database connection, and queries""" 6 | from __future__ import (absolute_import, print_function, 7 | division) 8 | 9 | from .config import PersistenceConfig 10 | from .content_database import ContentDatabase 11 | from .relational_database import RelationalDatabase 12 | 13 | persistence_config = PersistenceConfig() # pylint: disable=invalid-name 14 | content = ContentDatabase(persistence_config) # pylint: disable=invalid-name 15 | relational = RelationalDatabase(persistence_config) # pylint: disable=invalid-name 16 | 17 | 18 | def get_serializer(arg): # pylint: disable=unused-argument 19 | """Select serializer according to argument""" 20 | # ToDo #54: use arg to select serialize 21 | # from .serializers import jsonpickle_serializer, jsonpickle_content 22 | # from .serializers import SimpleSerializer 23 | # return SimpleSerializer().serialize 24 | # return jsonpickle_serializer 25 | # return jsonpickle_content 26 | return repr 27 | 28 | 29 | __all__ = [ 30 | "persistence_config", 31 | "content", 32 | "relational", 33 | "get_serializer" 34 | ] 35 | -------------------------------------------------------------------------------- /capture/noworkflow/now/persistence/content/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/capture/noworkflow/now/persistence/content/__init__.py -------------------------------------------------------------------------------- /capture/noworkflow/now/persistence/content/gitdb_engine.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2019 Universidade Federal Fluminense (UFF) 2 | # Copyright (c) 2019 Polytechnic Institute of New York University. 3 | # This file is part of noWorkflow. 4 | # Please, consult the license terms in the LICENSE file. 5 | """GitDb content database engine""" 6 | import hashlib 7 | 8 | from io import BytesIO 9 | 10 | from gitdb import LooseObjectDB, IStream 11 | 12 | from ...utils.cross_version import StringIO 13 | from .pygit_engine import PyGitEngine 14 | 15 | # ToDo: implement other methods using GitDB to not depend on PyGitEngine 16 | 17 | class GitDBPyGitEngine(PyGitEngine): 18 | 19 | @staticmethod 20 | def do_put(content_path, object_hashes, content, filename): 21 | """Perform put operation. This is used in the distributed wrapper""" 22 | ldb = LooseObjectDB("/{}/objects/".format(content_path)) 23 | istream = IStream("blob", len(content), BytesIO(content)) 24 | ldb.store(istream) 25 | content_hash = istream.hexsha 26 | filename_hash = hashlib.sha1(filename.encode('utf-8')).hexdigest() 27 | result = object_hashes[filename_hash] = str(content_hash.decode('utf-8')) 28 | return result 29 | -------------------------------------------------------------------------------- /capture/noworkflow/now/persistence/lightweight/argument.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2016 Universidade Federal Fluminense (UFF) 2 | # Copyright (c) 2016 Polytechnic Institute of New York University. 3 | # This file is part of noWorkflow. 4 | # Please, consult the license terms in the LICENSE file. 5 | """Lightweight Argument""" 6 | from __future__ import (absolute_import, print_function, 7 | division, unicode_literals) 8 | 9 | from .base import BaseLW, define_attrs 10 | from ..models import Argument 11 | 12 | 13 | class ArgumentLW(BaseLW): 14 | """Argument lightweight object""" 15 | 16 | __slots__, attributes = define_attrs( 17 | ["trial_id", "id", "name", "value"] 18 | ) 19 | nullable = set() 20 | model = Argument 21 | 22 | def __init__(self, id_, trial_id, name, value): 23 | self.trial_id = trial_id 24 | self.id = id_ # pylint: disable=invalid-name 25 | self.name = name 26 | self.value = value 27 | 28 | def is_complete(self): # pylint: disable=no-self-use 29 | """Argument can always be removed from object store""" 30 | return True 31 | 32 | def __repr__(self): 33 | return ( 34 | "Argument(id={0.id}, name={0.name}, value={0.value})" 35 | ).format(self) 36 | 37 | def __json__(self): 38 | return { 39 | 'trial_id': self.trial_id, 40 | 'id': self.id, 41 | 'name': self.name, 42 | 'value': self.value 43 | } 44 | 45 | -------------------------------------------------------------------------------- /capture/noworkflow/now/persistence/lightweight/environment_attr.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2016 Universidade Federal Fluminense (UFF) 2 | # Copyright (c) 2016 Polytechnic Institute of New York University. 3 | # This file is part of noWorkflow. 4 | # Please, consult the license terms in the LICENSE file. 5 | """Lightweight Environment Attribute""" 6 | from __future__ import (absolute_import, print_function, 7 | division, unicode_literals) 8 | 9 | from ..models import EnvironmentAttr 10 | from .base import BaseLW, define_attrs 11 | 12 | 13 | class EnvironmentAttrLW(BaseLW): 14 | """EnvironmentAttr lightweight object 15 | There are type definitions on lightweight.pxd 16 | """ 17 | 18 | __slots__, attributes = define_attrs( 19 | ["trial_id", "id", "name", "value"] 20 | ) 21 | nullable = set() 22 | model = EnvironmentAttr 23 | 24 | def __init__(self, id_, trial_id, name, value): 25 | self.trial_id = trial_id 26 | self.id = id_ # pylint: disable=invalid-name 27 | self.name = name 28 | self.value = value 29 | 30 | def is_complete(self): # pylint: disable=no-self-use 31 | """EnvironmentAttr can always be removed from object store""" 32 | return True 33 | 34 | def __repr__(self): 35 | return ( 36 | "EnvironmentAttr(id={0.id}, name={0.name}, value={0.value})" 37 | ).format(self) 38 | 39 | def __json__(self): 40 | return { 41 | 'trial_id': self.trial_id, 42 | 'id': self.id, 43 | 'name': self.name, 44 | 'value': self.value 45 | } -------------------------------------------------------------------------------- /capture/noworkflow/now/persistence/lightweight/experiment.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2016 Universidade Federal Fluminense (UFF) 2 | # Copyright (c) 2016 Polytechnic Institute of New York University. 3 | # This file is part of noWorkflow. 4 | # Please, consult the license terms in the LICENSE file. 5 | """Lightweight Experiment""" 6 | from __future__ import (absolute_import, print_function, 7 | division, unicode_literals) 8 | from .base import BaseLW, define_attrs 9 | 10 | 11 | class ExperimentLW(BaseLW): # pylint: disable=too-many-instance-attributes 12 | """Evaluation lightweight object""" 13 | 14 | __slots__, attributes = define_attrs( 15 | ["description","name", "id"] 16 | ) 17 | 18 | def __init__(self, name, id,description): 19 | self.description = description 20 | self.name = name 21 | self.id = id 22 | 23 | def __json__(self): 24 | return { 25 | 'description': self.description, 26 | 'name': self.name, 27 | 'id': self.id 28 | } 29 | -------------------------------------------------------------------------------- /capture/noworkflow/now/persistence/lightweight/group.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2016 Universidade Federal Fluminense (UFF) 2 | # Copyright (c) 2016 Polytechnic Institute of New York University. 3 | # This file is part of noWorkflow. 4 | # Please, consult the license terms in the LICENSE file. 5 | """Lightweight Group""" 6 | from __future__ import (absolute_import, print_function, 7 | division, unicode_literals) 8 | from .base import BaseLW, define_attrs 9 | 10 | 11 | class GroupLW(BaseLW): # pylint: disable=too-many-instance-attributes 12 | """Group lightweight object""" 13 | 14 | __slots__, attributes = define_attrs( 15 | ["users","name", "id"] 16 | ) 17 | 18 | def __init__(self, id,name,users): 19 | self.users = users 20 | self.name = name 21 | self.id = id 22 | 23 | def __json__(self): 24 | return { 25 | 'members': self.users, 26 | 'name': self.name, 27 | 'id': self.id 28 | } 29 | -------------------------------------------------------------------------------- /capture/noworkflow/now/persistence/lightweight/memberOfGroup.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2016 Universidade Federal Fluminense (UFF) 2 | # Copyright (c) 2016 Polytechnic Institute of New York University. 3 | # This file is part of noWorkflow. 4 | # Please, consult the license terms in the LICENSE file. 5 | """Lightweight MemberOfGroup""" 6 | from __future__ import (absolute_import, print_function, 7 | division, unicode_literals) 8 | from .base import BaseLW, define_attrs 9 | 10 | 11 | class MemberOfGroupLW(BaseLW): # pylint: disable=too-many-instance-attributes 12 | """MemberOfGroup lightweight object""" 13 | 14 | __slots__, attributes = define_attrs( 15 | ["userId","groupId", "id"] 16 | ) 17 | 18 | def __init__(self, id,groupId,userId): 19 | 20 | self.userId = userId 21 | self.groupId = groupId 22 | self.id = id 23 | 24 | def __json__(self): 25 | return { 26 | 'userId': self.userId, 27 | 'groupId': self.groupId, 28 | 'id': self.id 29 | } 30 | -------------------------------------------------------------------------------- /capture/noworkflow/now/persistence/lightweight/remote.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2016 Universidade Federal Fluminense (UFF) 2 | # Copyright (c) 2016 Polytechnic Institute of New York University. 3 | # This file is part of noWorkflow. 4 | # Please, consult the license terms in the LICENSE file. 5 | """Lightweight Remote""" 6 | from __future__ import (absolute_import, print_function, 7 | division, unicode_literals) 8 | 9 | 10 | from ..models import Remote 11 | from .base import BaseLW, define_attrs 12 | 13 | class RemoteLW(BaseLW): # pylint: disable=too-many-instance-attributes 14 | """Remote lightweight object""" 15 | 16 | __slots__, attributes = define_attrs( 17 | ["relatedExperiment","server_url","name", "id", "used", "hide"] 18 | ) 19 | nullable = set() 20 | model = Remote 21 | 22 | def __init__(self, id, server_url, name, used, hide): 23 | 24 | self.server_url = server_url 25 | self.id = id 26 | self.name = name 27 | self.used = used 28 | self.hide = hide 29 | 30 | def __json__(self): 31 | return { 32 | 33 | 'server_url': self.server_url, 34 | 'name': self.name, 35 | 'id': self.id, 36 | 'used': self.used, 37 | 'hide': self.hide 38 | } -------------------------------------------------------------------------------- /capture/noworkflow/now/persistence/lightweight/user.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2016 Universidade Federal Fluminense (UFF) 2 | # Copyright (c) 2016 Polytechnic Institute of New York University. 3 | # This file is part of noWorkflow. 4 | # Please, consult the license terms in the LICENSE file. 5 | """Lightweight User""" 6 | from __future__ import (absolute_import, print_function, 7 | division, unicode_literals) 8 | 9 | 10 | from ..models import User 11 | from .base import BaseLW, define_attrs 12 | 13 | 14 | class UserLW(BaseLW): # pylint: disable=too-many-instance-attributes 15 | """User lightweight object""" 16 | 17 | __slots__, attributes = define_attrs( 18 | ["trial_id","userLogin", "id"] 19 | ) 20 | nullable = set() 21 | model = User 22 | 23 | def __init__(self, id,userLogin): 24 | 25 | self.userLogin = userLogin 26 | self.id = id 27 | self.trial_id=id 28 | 29 | def __json__(self): 30 | return { 31 | 32 | 'userLogin': self.userLogin, 33 | 'id': self.id 34 | } 35 | -------------------------------------------------------------------------------- /capture/noworkflow/now/tagging/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/capture/noworkflow/now/tagging/__init__.py -------------------------------------------------------------------------------- /capture/noworkflow/now/utils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/capture/noworkflow/now/utils/__init__.py -------------------------------------------------------------------------------- /capture/noworkflow/now/utils/compression.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2016 Universidade Federal Fluminense (UFF) 2 | # Copyright (c) 2016 Polytechnic Institute of New York University. 3 | # This file is part of noWorkflow. 4 | # Please, consult the license terms in the LICENSE file. 5 | 6 | import gzip 7 | from io import StringIO as StringIO 8 | from io import BytesIO as IO 9 | 10 | def gzip_compress(data): 11 | gzip_buffer = IO() 12 | gzip_file = gzip.GzipFile(mode='wb', 13 | fileobj=gzip_buffer) 14 | gzip_file.write(data) 15 | gzip_file.close() 16 | return gzip_buffer.getvalue() 17 | 18 | def gzip_uncompress(data): 19 | fakefile=IO(data) 20 | uncompressed = gzip.GzipFile(fileobj=fakefile, mode='rb') 21 | return uncompressed.read() -------------------------------------------------------------------------------- /capture/noworkflow/now/utils/future_cross_version.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2016 Universidade Federal Fluminense (UFF) 2 | # Copyright (c) 2016 Polytechnic Institute of New York University. 3 | # This file is part of noWorkflow. 4 | # Please, consult the license terms in the LICENSE file. 5 | 6 | # __future__ statements are allowed here 7 | """Provide support for both Python 2 and Python 3""" 8 | from __future__ import print_function 9 | import sys 10 | PY3 = sys.version_info >= (3, 0) 11 | 12 | def cross_print(*value, **kwargs): 13 | kwargs['sep'] = kwargs.get('sep', ' ') 14 | kwargs['end'] = kwargs.get('end', '\n') 15 | kwargs['file'] = kwargs.get('file', sys.stdout) 16 | if PY3: 17 | kwargs['flush'] = kwargs.get('flush', False) 18 | 19 | print(*value, **kwargs) 20 | cross_print.__name__ = "print" 21 | -------------------------------------------------------------------------------- /capture/noworkflow/now/utils/io.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2016 Universidade Federal Fluminense (UFF) 2 | # Copyright (c) 2016 Polytechnic Institute of New York University. 3 | # This file is part of noWorkflow. 4 | # Please, consult the license terms in the LICENSE file. 5 | """Define io utility functions""" 6 | from __future__ import (absolute_import, print_function, 7 | division, unicode_literals) 8 | 9 | import sys 10 | 11 | from future.utils import viewitems 12 | 13 | from .cross_version import StringIO 14 | 15 | 16 | LABEL = "[now] " 17 | verbose = False # pylint: disable=invalid-name 18 | 19 | STDIN = sys.stdin 20 | STDOUT = sys.stdout 21 | STDERR = sys.stderr 22 | 23 | 24 | class redirect_output(object): # pylint: disable=invalid-name, too-few-public-methods 25 | """Redirect output to stream""" 26 | 27 | def __init__(self, outputs=None): 28 | if outputs is None: 29 | outputs = ["stdout", "stderr"] 30 | self.outputs = outputs 31 | self.old = {} 32 | 33 | def __enter__(self): 34 | result = [] 35 | for out in self.outputs: 36 | self.old[out] = getattr(sys, out) 37 | setattr(sys, out, StringIO()) 38 | result.append(self.old[out]) 39 | return result 40 | 41 | def __exit__(self, exc_type, value, traceback): 42 | for out, old in viewitems(self.old): 43 | setattr(sys, out, old) 44 | 45 | 46 | def print_msg(message, force=False, file=STDOUT): 47 | """Print message with [now] prefix when in verbose mode""" 48 | if verbose or force: 49 | print("{}{}".format(LABEL, message), file=file) 50 | -------------------------------------------------------------------------------- /capture/noworkflow/now/vis/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/capture/noworkflow/now/vis/__init__.py -------------------------------------------------------------------------------- /capture/noworkflow/now/vis/static/dist/13d8dd6bab096d39d72e58cc572d0d5e.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/capture/noworkflow/now/vis/static/dist/13d8dd6bab096d39d72e58cc572d0d5e.png -------------------------------------------------------------------------------- /capture/noworkflow/now/vis/static/dist/5d5a80a1f26acd8f2b0b2185541ba2f5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/capture/noworkflow/now/vis/static/dist/5d5a80a1f26acd8f2b0b2185541ba2f5.png -------------------------------------------------------------------------------- /capture/noworkflow/now/vis/static/dist/70faa0462a2ee32548d3.png: -------------------------------------------------------------------------------- 1 | export default __webpack_public_path__ + "d931ef5dd6f8edf07706d992a5f9c9b1.png"; -------------------------------------------------------------------------------- /capture/noworkflow/now/vis/static/dist/b47c5eefb3d150865f83.png: -------------------------------------------------------------------------------- 1 | export default __webpack_public_path__ + "5d5a80a1f26acd8f2b0b2185541ba2f5.png"; -------------------------------------------------------------------------------- /capture/noworkflow/now/vis/static/dist/ce00730515ffc48dc3092a83ceaa47b5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/capture/noworkflow/now/vis/static/dist/ce00730515ffc48dc3092a83ceaa47b5.png -------------------------------------------------------------------------------- /capture/noworkflow/now/vis/static/dist/config_widget.d.ts: -------------------------------------------------------------------------------- 1 | import { Widget } from '@phosphor/widgets'; 2 | import { Selection as d3_Selection, BaseType as d3_BaseType } from 'd3-selection'; 3 | export declare class ConfigWidget extends Widget { 4 | d3node: d3_Selection; 5 | static createNode(): HTMLElement; 6 | constructor(); 7 | showTrial(): boolean; 8 | showInfo(): boolean; 9 | graphType(): string; 10 | useCache(): boolean; 11 | } 12 | -------------------------------------------------------------------------------- /capture/noworkflow/now/vis/static/dist/d931ef5dd6f8edf07706d992a5f9c9b1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/capture/noworkflow/now/vis/static/dist/d931ef5dd6f8edf07706d992a5f9c9b1.png -------------------------------------------------------------------------------- /capture/noworkflow/now/vis/static/dist/edd58499a4c99757478e.png: -------------------------------------------------------------------------------- 1 | export default __webpack_public_path__ + "ce00730515ffc48dc3092a83ceaa47b5.png"; -------------------------------------------------------------------------------- /capture/noworkflow/now/vis/static/dist/f657671c5aa8023560bc.png: -------------------------------------------------------------------------------- 1 | export default __webpack_public_path__ + "13d8dd6bab096d39d72e58cc572d0d5e.png"; -------------------------------------------------------------------------------- /capture/noworkflow/now/vis/static/dist/graph/base_activation_graph.d.ts: -------------------------------------------------------------------------------- 1 | import { Selection as d3_Selection, BaseType as d3_BaseType } from 'd3-selection'; 2 | import { Widget } from '@phosphor/widgets'; 3 | import { TrialGraph, TrialGraphData } from '@noworkflow/trial'; 4 | export declare class BaseActivationGraphWidget extends Widget { 5 | name: string; 6 | cls: string; 7 | t1: string; 8 | t2: string; 9 | graph: TrialGraph; 10 | d3node: d3_Selection; 11 | static graphTypeForm(name: string, selectorDiv: d3_Selection): void; 12 | static useCacheForm(name: string, selectorDiv: d3_Selection): void; 13 | static createNode(name: string, fn?: (name: string, parent: d3_Selection) => void): HTMLElement; 14 | setGraph(data: TrialGraphData, config?: any): void; 15 | configureGraph(selectedGraph: string | undefined, useCache: boolean | undefined, genDataflow: boolean | undefined, data: TrialGraphData): void; 16 | protected onResize(msg: Widget.ResizeMessage): void; 17 | } 18 | -------------------------------------------------------------------------------- /capture/noworkflow/now/vis/static/dist/graph/diff_graph.d.ts: -------------------------------------------------------------------------------- 1 | import { Selection as d3_Selection, BaseType as d3_BaseType } from 'd3-selection'; 2 | import { BaseActivationGraphWidget } from './base_activation_graph'; 3 | export declare class DiffGraphWidget extends BaseActivationGraphWidget { 4 | static url(trial1: string, trial2: string, selectedGraph: string, useCache: boolean): string; 5 | static createForm(name: string, parent: d3_Selection): void; 6 | constructor(name: string, cls: string, t1: string, t2: string); 7 | load(selectedGraph?: string, useCache?: boolean): void; 8 | } 9 | -------------------------------------------------------------------------------- /capture/noworkflow/now/vis/static/dist/graph/history_graph.d.ts: -------------------------------------------------------------------------------- 1 | import { Selection as d3_Selection, BaseType as d3_BaseType } from 'd3-selection'; 2 | import { Widget } from '@phosphor/widgets'; 3 | import { HistoryGraph, HistoryGraphData } from '@noworkflow/history'; 4 | import { ConfigWidget } from '../config_widget'; 5 | export declare class HistoryWidget extends Widget { 6 | name: string; 7 | expId: string; 8 | cls: string; 9 | graph: HistoryGraph; 10 | d3node: d3_Selection; 11 | config: ConfigWidget; 12 | static url(script?: string, execution?: string, summarize?: boolean): string; 13 | static createNode(): HTMLElement; 14 | constructor(config: ConfigWidget, name: string, cls: string, expId: string); 15 | setGraph(data: HistoryGraphData, config?: any): void; 16 | load(script?: string, execution?: string, summarize?: boolean): void; 17 | protected onResize(msg: Widget.ResizeMessage): void; 18 | } 19 | -------------------------------------------------------------------------------- /capture/noworkflow/now/vis/static/dist/graph/trial_graph.d.ts: -------------------------------------------------------------------------------- 1 | import { Selection as d3_Selection, BaseType as d3_BaseType } from 'd3-selection'; 2 | import { Widget } from '@phosphor/widgets'; 3 | import { BaseActivationGraphWidget } from './base_activation_graph'; 4 | import { TrialGraph, TrialGraphData } from '@noworkflow/trial'; 5 | export declare class TrialGraphWidget extends BaseActivationGraphWidget { 6 | name: string; 7 | cls: string; 8 | t1: string; 9 | t2: string; 10 | graph: TrialGraph; 11 | d3node: d3_Selection; 12 | static url(trialId: string, selectedGraph: string, useCache: boolean): string; 13 | constructor(name: string, cls: string, t1: string, t2: string); 14 | setGraph(data: TrialGraphData, config?: any): void; 15 | configureGraph(selectedGraph: string | undefined, useCache: boolean | undefined, genDataflow: boolean | undefined, data: TrialGraphData): void; 16 | load(selectedGraph?: string, useCache?: boolean): void; 17 | protected onResize(msg: Widget.ResizeMessage): void; 18 | } 19 | -------------------------------------------------------------------------------- /capture/noworkflow/now/vis/static/dist/index.d.ts: -------------------------------------------------------------------------------- 1 | import '../style/index.css'; 2 | -------------------------------------------------------------------------------- /capture/noworkflow/now/vis/static/dist/info/diff_info.d.ts: -------------------------------------------------------------------------------- 1 | import { Selection as d3_Selection, BaseType as d3_BaseType } from 'd3-selection'; 2 | import { Widget } from '@phosphor/widgets'; 3 | import { DiffInfoData, FilterObject } from './structures'; 4 | export declare class DiffInfoWidget extends Widget { 5 | d3node: d3_Selection; 6 | display1: string; 7 | display2: string; 8 | static url(trial1: string, trial2: string): string; 9 | static modules_url(trial1: string, trial2: string): string; 10 | static environment_url(trial1: string, trial2: string): string; 11 | static accesses_url(trial1: string, trial2: string): string; 12 | static createNode(): HTMLElement; 13 | constructor(display1: string, display2: string, trial1: string, trial2: string); 14 | load(trial1: string, trial2: string): void; 15 | createMain(data: DiffInfoData): void; 16 | filter_trial(filter: FilterObject, filterfn: (strial: number) => void): void; 17 | loadModules(trial1: string, trial2: string): void; 18 | loadEnvironment(trial1: string, trial2: string): void; 19 | loadFileAccess(trial1: string, trial2: string): void; 20 | private info; 21 | private mod_li; 22 | private env_field; 23 | private env_li; 24 | private env_cli; 25 | private fa_field; 26 | private fa_li; 27 | private fa_cfield; 28 | } 29 | -------------------------------------------------------------------------------- /capture/noworkflow/now/vis/static/dist/info/environment_info.d.ts: -------------------------------------------------------------------------------- 1 | import { Selection as d3_Selection, BaseType as d3_BaseType } from 'd3-selection'; 2 | import { Widget } from '@phosphor/widgets'; 3 | import { EnvironmentItemData, FilterObject } from './structures'; 4 | export declare class EnvironmentInfoWidget extends Widget { 5 | d3node: d3_Selection; 6 | static url(trialId: string): string; 7 | static createItem(parent: d3_Selection, key: string, value: string): void; 8 | static createFilterDiv(parent: d3_Selection): d3_Selection; 9 | static createFilter(parent: d3_Selection, default_local?: string): FilterObject; 10 | static createList(parent: d3_Selection, data: EnvironmentItemData[], default_local?: string): FilterObject; 11 | static createNode(trialDisplay: string, data: EnvironmentItemData[], default_local?: string): HTMLElement; 12 | constructor(trialDisplay: string, data: EnvironmentItemData[], default_local?: string); 13 | } 14 | -------------------------------------------------------------------------------- /capture/noworkflow/now/vis/static/dist/info/file_accesses_info.d.ts: -------------------------------------------------------------------------------- 1 | import { Selection as d3_Selection, BaseType as d3_BaseType } from 'd3-selection'; 2 | import { Widget } from '@phosphor/widgets'; 3 | import { FileAccessData, FilterObject } from './structures'; 4 | export declare class FileAccessesInfoWidget extends Widget { 5 | d3node: d3_Selection; 6 | static url(trialId: string): string; 7 | static createFilterDiv(parent: d3_Selection): d3_Selection; 8 | static createFilter(parent: d3_Selection, default_local?: string): FilterObject; 9 | static createList(parent: d3_Selection, data: FileAccessData[], trial_path: string, default_local?: string): FilterObject; 10 | static createNode(trialDisplay: string, data: FileAccessData[], trial_path: string, default_local?: string): HTMLElement; 11 | constructor(trialDisplay: string, data: FileAccessData[], trial_path: string, default_local?: string); 12 | } 13 | -------------------------------------------------------------------------------- /capture/noworkflow/now/vis/static/dist/info/modules_info.d.ts: -------------------------------------------------------------------------------- 1 | import { Selection as d3_Selection, BaseType as d3_BaseType } from 'd3-selection'; 2 | import { Widget } from '@phosphor/widgets'; 3 | import { ModuleData, FilterObject } from './structures'; 4 | export declare class ModulesInfoWidget extends Widget { 5 | d3node: d3_Selection; 6 | static url(trialId: string): string; 7 | static createFilterDiv(parent: d3_Selection): d3_Selection; 8 | static createFilter(parent: d3_Selection, default_local?: string): FilterObject; 9 | static createList(parent: d3_Selection, data: ModuleData[], trial_path: string, default_local?: string): FilterObject; 10 | static createNode(trialDisplay: string, data: ModuleData[], trial_path: string): HTMLElement; 11 | constructor(trialDisplay: string, data: ModuleData[], trial_path: string); 12 | } 13 | -------------------------------------------------------------------------------- /capture/noworkflow/now/vis/static/dist/info/trial_info.d.ts: -------------------------------------------------------------------------------- 1 | import { Selection as d3_Selection, BaseType as d3_BaseType } from 'd3-selection'; 2 | import { Widget } from '@phosphor/widgets'; 3 | import { VisibleHistoryNode } from '@noworkflow/history'; 4 | import { FilterObject } from './structures'; 5 | export declare class TrialInfoWidget extends Widget { 6 | d3node: d3_Selection; 7 | trial: VisibleHistoryNode; 8 | static createNode(trial: VisibleHistoryNode): HTMLElement; 9 | constructor(trial: VisibleHistoryNode); 10 | static createFold(parent: d3_Selection, title: string): d3_Selection; 11 | static createFilterFold(fold: d3_Selection, filter: FilterObject): void; 12 | loadModules(): void; 13 | loadEnvironment(): void; 14 | loadFileAccess(): void; 15 | } 16 | -------------------------------------------------------------------------------- /capture/noworkflow/now/vis/static/dist/nowpanel.d.ts: -------------------------------------------------------------------------------- 1 | import { DockPanel, Widget, DockLayout } from '@phosphor/widgets'; 2 | export interface VisWidget extends Widget { 3 | nowVis?: string; 4 | } 5 | export interface FindResult { 6 | area: DockLayout.AreaConfig | null; 7 | index: number; 8 | } 9 | export declare function findInLayout(area: DockLayout.AreaConfig | null, widget: Widget): FindResult | null; 10 | export declare class NowVisPanel extends DockPanel { 11 | addMainWidget(widget: Widget, options?: DockLayout.IAddOptions): void; 12 | addGraphWidget(widget: Widget, options?: DockLayout.IAddOptions): void; 13 | addInfoWidget(widget: Widget, options?: DockLayout.IAddOptions): void; 14 | } 15 | -------------------------------------------------------------------------------- /capture/noworkflow/now/vis/static/dist/project_widget.d.ts: -------------------------------------------------------------------------------- 1 | import { Widget } from '@phosphor/widgets'; 2 | import '../style/bootstrap.min.css'; 3 | import { Selection as d3_Selection, BaseType as d3_BaseType } from 'd3-selection'; 4 | interface IExperiment { 5 | id: string; 6 | name: string; 7 | description: string; 8 | } 9 | export declare class ProjectWidget extends Widget { 10 | d3node: d3_Selection; 11 | expTBody: d3_Selection; 12 | successFeedback: d3_Selection; 13 | errorFeedback: d3_Selection; 14 | experiments: Array; 15 | static createNode(): HTMLElement; 16 | constructor(experiments: Array); 17 | addExpRow(exp: IExperiment): void; 18 | addFormInput(form: d3_Selection, fieldId: string, fieldLabel: string, fieldType: string): d3_Selection; 19 | addFeedBackinfo(baseNode: d3_Selection, cls: string, txt: string, desc: string): d3_Selection; 20 | hideNode(node: d3_Selection): void; 21 | showNode(node: d3_Selection): void; 22 | setNode(): void; 23 | } 24 | export {}; 25 | -------------------------------------------------------------------------------- /capture/noworkflow/now/vis/static/external/jquery.splitter.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * StyleSheet for JQuery splitter Plugin 3 | * Copyright (C) 2010 Jakub Jankiewicz 4 | * 5 | * Same license as plugin 6 | */ 7 | .splitter_panel { 8 | position: relative; 9 | } 10 | .splitter_panel .vsplitter { 11 | background-color: grey; 12 | cursor: col-resize; 13 | z-index:900; 14 | width: 4px; 15 | } 16 | 17 | .splitter_panel .hsplitter { 18 | background-color: #5F5F5F; 19 | cursor: row-resize; 20 | z-index: 800; 21 | height: 4px; 22 | } 23 | .splitter_panel .vsplitter.splitter-invisible, 24 | .splitter_panel .hsplitter.splitter-invisible { 25 | background: none; 26 | } 27 | .splitter_panel .vsplitter, .splitter_panel .left_panel, .splitter_panel .right_panel, 28 | .splitter_panel .hsplitter, .splitter_panel .top_panel, .splitter_panel .bottom_panel { 29 | position: absolute; 30 | overflow: auto; 31 | } 32 | .splitter_panel .vsplitter, .splitter_panel .left_panel, .splitter_panel .right_panel { 33 | height: 100%; 34 | } 35 | .splitter_panel .hsplitter, .splitter_panel .top_panel, .splitter_panel .bottom_panel { 36 | width: 100%; 37 | } 38 | .splitter_panel .top_panel, .splitter_panel .left_panel, .splitter_panel .vsplitter { 39 | top: 0; 40 | } 41 | .splitter_panel .top_panel, .splitter_panel .bottom_panel, .splitter_panel .left_panel, .splitter_panel .hsplitter { 42 | left: 0; 43 | } 44 | .splitter_panel .bottom_panel { 45 | bottom: 0; 46 | } 47 | .splitter_panel .right_panel { 48 | right: 0; 49 | } 50 | .splitterMask { 51 | position: absolute; 52 | left: 0; 53 | top: 0; 54 | right: 0; 55 | bottom: 0; 56 | z-index: 1000; 57 | } 58 | -------------------------------------------------------------------------------- /capture/noworkflow/now/vis/static/font-awesome-4.7.0/HELP-US-OUT.txt: -------------------------------------------------------------------------------- 1 | I hope you love Font Awesome. If you've found it useful, please do me a favor and check out my latest project, 2 | Fort Awesome (https://fortawesome.com). It makes it easy to put the perfect icons on your website. Choose from our awesome, 3 | comprehensive icon sets or copy and paste your own. 4 | 5 | Please. Check it out. 6 | 7 | -Dave Gandy 8 | -------------------------------------------------------------------------------- /capture/noworkflow/now/vis/static/font-awesome-4.7.0/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/capture/noworkflow/now/vis/static/font-awesome-4.7.0/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /capture/noworkflow/now/vis/static/font-awesome-4.7.0/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/capture/noworkflow/now/vis/static/font-awesome-4.7.0/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /capture/noworkflow/now/vis/static/font-awesome-4.7.0/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/capture/noworkflow/now/vis/static/font-awesome-4.7.0/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /capture/noworkflow/now/vis/static/font-awesome-4.7.0/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/capture/noworkflow/now/vis/static/font-awesome-4.7.0/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /capture/noworkflow/now/vis/static/font-awesome-4.7.0/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/capture/noworkflow/now/vis/static/font-awesome-4.7.0/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /capture/noworkflow/now/vis/static/font-awesome-4.7.0/less/animated.less: -------------------------------------------------------------------------------- 1 | // Animated Icons 2 | // -------------------------- 3 | 4 | .@{fa-css-prefix}-spin { 5 | -webkit-animation: fa-spin 2s infinite linear; 6 | animation: fa-spin 2s infinite linear; 7 | } 8 | 9 | .@{fa-css-prefix}-pulse { 10 | -webkit-animation: fa-spin 1s infinite steps(8); 11 | animation: fa-spin 1s infinite steps(8); 12 | } 13 | 14 | @-webkit-keyframes fa-spin { 15 | 0% { 16 | -webkit-transform: rotate(0deg); 17 | transform: rotate(0deg); 18 | } 19 | 100% { 20 | -webkit-transform: rotate(359deg); 21 | transform: rotate(359deg); 22 | } 23 | } 24 | 25 | @keyframes fa-spin { 26 | 0% { 27 | -webkit-transform: rotate(0deg); 28 | transform: rotate(0deg); 29 | } 30 | 100% { 31 | -webkit-transform: rotate(359deg); 32 | transform: rotate(359deg); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /capture/noworkflow/now/vis/static/font-awesome-4.7.0/less/bordered-pulled.less: -------------------------------------------------------------------------------- 1 | // Bordered & Pulled 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-border { 5 | padding: .2em .25em .15em; 6 | border: solid .08em @fa-border-color; 7 | border-radius: .1em; 8 | } 9 | 10 | .@{fa-css-prefix}-pull-left { float: left; } 11 | .@{fa-css-prefix}-pull-right { float: right; } 12 | 13 | .@{fa-css-prefix} { 14 | &.@{fa-css-prefix}-pull-left { margin-right: .3em; } 15 | &.@{fa-css-prefix}-pull-right { margin-left: .3em; } 16 | } 17 | 18 | /* Deprecated as of 4.4.0 */ 19 | .pull-right { float: right; } 20 | .pull-left { float: left; } 21 | 22 | .@{fa-css-prefix} { 23 | &.pull-left { margin-right: .3em; } 24 | &.pull-right { margin-left: .3em; } 25 | } 26 | -------------------------------------------------------------------------------- /capture/noworkflow/now/vis/static/font-awesome-4.7.0/less/core.less: -------------------------------------------------------------------------------- 1 | // Base Class Definition 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix} { 5 | display: inline-block; 6 | font: normal normal normal @fa-font-size-base/@fa-line-height-base FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | 12 | } 13 | -------------------------------------------------------------------------------- /capture/noworkflow/now/vis/static/font-awesome-4.7.0/less/fixed-width.less: -------------------------------------------------------------------------------- 1 | // Fixed Width Icons 2 | // ------------------------- 3 | .@{fa-css-prefix}-fw { 4 | width: (18em / 14); 5 | text-align: center; 6 | } 7 | -------------------------------------------------------------------------------- /capture/noworkflow/now/vis/static/font-awesome-4.7.0/less/font-awesome.less: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome 3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) 4 | */ 5 | 6 | @import "variables.less"; 7 | @import "mixins.less"; 8 | @import "path.less"; 9 | @import "core.less"; 10 | @import "larger.less"; 11 | @import "fixed-width.less"; 12 | @import "list.less"; 13 | @import "bordered-pulled.less"; 14 | @import "animated.less"; 15 | @import "rotated-flipped.less"; 16 | @import "stacked.less"; 17 | @import "icons.less"; 18 | @import "screen-reader.less"; 19 | -------------------------------------------------------------------------------- /capture/noworkflow/now/vis/static/font-awesome-4.7.0/less/larger.less: -------------------------------------------------------------------------------- 1 | // Icon Sizes 2 | // ------------------------- 3 | 4 | /* makes the font 33% larger relative to the icon container */ 5 | .@{fa-css-prefix}-lg { 6 | font-size: (4em / 3); 7 | line-height: (3em / 4); 8 | vertical-align: -15%; 9 | } 10 | .@{fa-css-prefix}-2x { font-size: 2em; } 11 | .@{fa-css-prefix}-3x { font-size: 3em; } 12 | .@{fa-css-prefix}-4x { font-size: 4em; } 13 | .@{fa-css-prefix}-5x { font-size: 5em; } 14 | -------------------------------------------------------------------------------- /capture/noworkflow/now/vis/static/font-awesome-4.7.0/less/list.less: -------------------------------------------------------------------------------- 1 | // List Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-ul { 5 | padding-left: 0; 6 | margin-left: @fa-li-width; 7 | list-style-type: none; 8 | > li { position: relative; } 9 | } 10 | .@{fa-css-prefix}-li { 11 | position: absolute; 12 | left: -@fa-li-width; 13 | width: @fa-li-width; 14 | top: (2em / 14); 15 | text-align: center; 16 | &.@{fa-css-prefix}-lg { 17 | left: (-@fa-li-width + (4em / 14)); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /capture/noworkflow/now/vis/static/font-awesome-4.7.0/less/path.less: -------------------------------------------------------------------------------- 1 | /* FONT PATH 2 | * -------------------------- */ 3 | 4 | @font-face { 5 | font-family: 'FontAwesome'; 6 | src: url('@{fa-font-path}/fontawesome-webfont.eot?v=@{fa-version}'); 7 | src: url('@{fa-font-path}/fontawesome-webfont.eot?#iefix&v=@{fa-version}') format('embedded-opentype'), 8 | url('@{fa-font-path}/fontawesome-webfont.woff2?v=@{fa-version}') format('woff2'), 9 | url('@{fa-font-path}/fontawesome-webfont.woff?v=@{fa-version}') format('woff'), 10 | url('@{fa-font-path}/fontawesome-webfont.ttf?v=@{fa-version}') format('truetype'), 11 | url('@{fa-font-path}/fontawesome-webfont.svg?v=@{fa-version}#fontawesomeregular') format('svg'); 12 | // src: url('@{fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts 13 | font-weight: normal; 14 | font-style: normal; 15 | } 16 | -------------------------------------------------------------------------------- /capture/noworkflow/now/vis/static/font-awesome-4.7.0/less/rotated-flipped.less: -------------------------------------------------------------------------------- 1 | // Rotated & Flipped Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-rotate-90 { .fa-icon-rotate(90deg, 1); } 5 | .@{fa-css-prefix}-rotate-180 { .fa-icon-rotate(180deg, 2); } 6 | .@{fa-css-prefix}-rotate-270 { .fa-icon-rotate(270deg, 3); } 7 | 8 | .@{fa-css-prefix}-flip-horizontal { .fa-icon-flip(-1, 1, 0); } 9 | .@{fa-css-prefix}-flip-vertical { .fa-icon-flip(1, -1, 2); } 10 | 11 | // Hook for IE8-9 12 | // ------------------------- 13 | 14 | :root .@{fa-css-prefix}-rotate-90, 15 | :root .@{fa-css-prefix}-rotate-180, 16 | :root .@{fa-css-prefix}-rotate-270, 17 | :root .@{fa-css-prefix}-flip-horizontal, 18 | :root .@{fa-css-prefix}-flip-vertical { 19 | filter: none; 20 | } 21 | -------------------------------------------------------------------------------- /capture/noworkflow/now/vis/static/font-awesome-4.7.0/less/screen-reader.less: -------------------------------------------------------------------------------- 1 | // Screen Readers 2 | // ------------------------- 3 | 4 | .sr-only { .sr-only(); } 5 | .sr-only-focusable { .sr-only-focusable(); } 6 | -------------------------------------------------------------------------------- /capture/noworkflow/now/vis/static/font-awesome-4.7.0/less/stacked.less: -------------------------------------------------------------------------------- 1 | // Stacked Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-stack { 5 | position: relative; 6 | display: inline-block; 7 | width: 2em; 8 | height: 2em; 9 | line-height: 2em; 10 | vertical-align: middle; 11 | } 12 | .@{fa-css-prefix}-stack-1x, .@{fa-css-prefix}-stack-2x { 13 | position: absolute; 14 | left: 0; 15 | width: 100%; 16 | text-align: center; 17 | } 18 | .@{fa-css-prefix}-stack-1x { line-height: inherit; } 19 | .@{fa-css-prefix}-stack-2x { font-size: 2em; } 20 | .@{fa-css-prefix}-inverse { color: @fa-inverse; } 21 | -------------------------------------------------------------------------------- /capture/noworkflow/now/vis/static/font-awesome-4.7.0/scss/_animated.scss: -------------------------------------------------------------------------------- 1 | // Spinning Icons 2 | // -------------------------- 3 | 4 | .#{$fa-css-prefix}-spin { 5 | -webkit-animation: fa-spin 2s infinite linear; 6 | animation: fa-spin 2s infinite linear; 7 | } 8 | 9 | .#{$fa-css-prefix}-pulse { 10 | -webkit-animation: fa-spin 1s infinite steps(8); 11 | animation: fa-spin 1s infinite steps(8); 12 | } 13 | 14 | @-webkit-keyframes fa-spin { 15 | 0% { 16 | -webkit-transform: rotate(0deg); 17 | transform: rotate(0deg); 18 | } 19 | 100% { 20 | -webkit-transform: rotate(359deg); 21 | transform: rotate(359deg); 22 | } 23 | } 24 | 25 | @keyframes fa-spin { 26 | 0% { 27 | -webkit-transform: rotate(0deg); 28 | transform: rotate(0deg); 29 | } 30 | 100% { 31 | -webkit-transform: rotate(359deg); 32 | transform: rotate(359deg); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /capture/noworkflow/now/vis/static/font-awesome-4.7.0/scss/_bordered-pulled.scss: -------------------------------------------------------------------------------- 1 | // Bordered & Pulled 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-border { 5 | padding: .2em .25em .15em; 6 | border: solid .08em $fa-border-color; 7 | border-radius: .1em; 8 | } 9 | 10 | .#{$fa-css-prefix}-pull-left { float: left; } 11 | .#{$fa-css-prefix}-pull-right { float: right; } 12 | 13 | .#{$fa-css-prefix} { 14 | &.#{$fa-css-prefix}-pull-left { margin-right: .3em; } 15 | &.#{$fa-css-prefix}-pull-right { margin-left: .3em; } 16 | } 17 | 18 | /* Deprecated as of 4.4.0 */ 19 | .pull-right { float: right; } 20 | .pull-left { float: left; } 21 | 22 | .#{$fa-css-prefix} { 23 | &.pull-left { margin-right: .3em; } 24 | &.pull-right { margin-left: .3em; } 25 | } 26 | -------------------------------------------------------------------------------- /capture/noworkflow/now/vis/static/font-awesome-4.7.0/scss/_core.scss: -------------------------------------------------------------------------------- 1 | // Base Class Definition 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix} { 5 | display: inline-block; 6 | font: normal normal normal #{$fa-font-size-base}/#{$fa-line-height-base} FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | 12 | } 13 | -------------------------------------------------------------------------------- /capture/noworkflow/now/vis/static/font-awesome-4.7.0/scss/_fixed-width.scss: -------------------------------------------------------------------------------- 1 | // Fixed Width Icons 2 | // ------------------------- 3 | .#{$fa-css-prefix}-fw { 4 | width: (18em / 14); 5 | text-align: center; 6 | } 7 | -------------------------------------------------------------------------------- /capture/noworkflow/now/vis/static/font-awesome-4.7.0/scss/_larger.scss: -------------------------------------------------------------------------------- 1 | // Icon Sizes 2 | // ------------------------- 3 | 4 | /* makes the font 33% larger relative to the icon container */ 5 | .#{$fa-css-prefix}-lg { 6 | font-size: (4em / 3); 7 | line-height: (3em / 4); 8 | vertical-align: -15%; 9 | } 10 | .#{$fa-css-prefix}-2x { font-size: 2em; } 11 | .#{$fa-css-prefix}-3x { font-size: 3em; } 12 | .#{$fa-css-prefix}-4x { font-size: 4em; } 13 | .#{$fa-css-prefix}-5x { font-size: 5em; } 14 | -------------------------------------------------------------------------------- /capture/noworkflow/now/vis/static/font-awesome-4.7.0/scss/_list.scss: -------------------------------------------------------------------------------- 1 | // List Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-ul { 5 | padding-left: 0; 6 | margin-left: $fa-li-width; 7 | list-style-type: none; 8 | > li { position: relative; } 9 | } 10 | .#{$fa-css-prefix}-li { 11 | position: absolute; 12 | left: -$fa-li-width; 13 | width: $fa-li-width; 14 | top: (2em / 14); 15 | text-align: center; 16 | &.#{$fa-css-prefix}-lg { 17 | left: -$fa-li-width + (4em / 14); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /capture/noworkflow/now/vis/static/font-awesome-4.7.0/scss/_path.scss: -------------------------------------------------------------------------------- 1 | /* FONT PATH 2 | * -------------------------- */ 3 | 4 | @font-face { 5 | font-family: 'FontAwesome'; 6 | src: url('#{$fa-font-path}/fontawesome-webfont.eot?v=#{$fa-version}'); 7 | src: url('#{$fa-font-path}/fontawesome-webfont.eot?#iefix&v=#{$fa-version}') format('embedded-opentype'), 8 | url('#{$fa-font-path}/fontawesome-webfont.woff2?v=#{$fa-version}') format('woff2'), 9 | url('#{$fa-font-path}/fontawesome-webfont.woff?v=#{$fa-version}') format('woff'), 10 | url('#{$fa-font-path}/fontawesome-webfont.ttf?v=#{$fa-version}') format('truetype'), 11 | url('#{$fa-font-path}/fontawesome-webfont.svg?v=#{$fa-version}#fontawesomeregular') format('svg'); 12 | // src: url('#{$fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts 13 | font-weight: normal; 14 | font-style: normal; 15 | } 16 | -------------------------------------------------------------------------------- /capture/noworkflow/now/vis/static/font-awesome-4.7.0/scss/_rotated-flipped.scss: -------------------------------------------------------------------------------- 1 | // Rotated & Flipped Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-rotate-90 { @include fa-icon-rotate(90deg, 1); } 5 | .#{$fa-css-prefix}-rotate-180 { @include fa-icon-rotate(180deg, 2); } 6 | .#{$fa-css-prefix}-rotate-270 { @include fa-icon-rotate(270deg, 3); } 7 | 8 | .#{$fa-css-prefix}-flip-horizontal { @include fa-icon-flip(-1, 1, 0); } 9 | .#{$fa-css-prefix}-flip-vertical { @include fa-icon-flip(1, -1, 2); } 10 | 11 | // Hook for IE8-9 12 | // ------------------------- 13 | 14 | :root .#{$fa-css-prefix}-rotate-90, 15 | :root .#{$fa-css-prefix}-rotate-180, 16 | :root .#{$fa-css-prefix}-rotate-270, 17 | :root .#{$fa-css-prefix}-flip-horizontal, 18 | :root .#{$fa-css-prefix}-flip-vertical { 19 | filter: none; 20 | } 21 | -------------------------------------------------------------------------------- /capture/noworkflow/now/vis/static/font-awesome-4.7.0/scss/_screen-reader.scss: -------------------------------------------------------------------------------- 1 | // Screen Readers 2 | // ------------------------- 3 | 4 | .sr-only { @include sr-only(); } 5 | .sr-only-focusable { @include sr-only-focusable(); } 6 | -------------------------------------------------------------------------------- /capture/noworkflow/now/vis/static/font-awesome-4.7.0/scss/_stacked.scss: -------------------------------------------------------------------------------- 1 | // Stacked Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-stack { 5 | position: relative; 6 | display: inline-block; 7 | width: 2em; 8 | height: 2em; 9 | line-height: 2em; 10 | vertical-align: middle; 11 | } 12 | .#{$fa-css-prefix}-stack-1x, .#{$fa-css-prefix}-stack-2x { 13 | position: absolute; 14 | left: 0; 15 | width: 100%; 16 | text-align: center; 17 | } 18 | .#{$fa-css-prefix}-stack-1x { line-height: inherit; } 19 | .#{$fa-css-prefix}-stack-2x { font-size: 2em; } 20 | .#{$fa-css-prefix}-inverse { color: $fa-inverse; } 21 | -------------------------------------------------------------------------------- /capture/noworkflow/now/vis/static/font-awesome-4.7.0/scss/font-awesome.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome 3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) 4 | */ 5 | 6 | @import "variables"; 7 | @import "mixins"; 8 | @import "path"; 9 | @import "core"; 10 | @import "larger"; 11 | @import "fixed-width"; 12 | @import "list"; 13 | @import "bordered-pulled"; 14 | @import "animated"; 15 | @import "rotated-flipped"; 16 | @import "stacked"; 17 | @import "icons"; 18 | @import "screen-reader"; 19 | -------------------------------------------------------------------------------- /capture/noworkflow/now/vis/templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Graph 5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 |
13 | 14 | 15 | -------------------------------------------------------------------------------- /capture/noworkflow/patterns/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2017 Universidade Federal Fluminense (UFF) 2 | # Copyright (c) 2017 Polytechnic Institute of New York University. 3 | # This file is part of noWorkflow. 4 | # Please, consult the license terms in the LICENSE file. 5 | """Pattern Matching Module""" 6 | # pylint: disable=invalid-name 7 | 8 | from .machinery import BLANK, create_rule, restrict_rule, prolog_rule, var 9 | from .machinery import set_options_in_rule 10 | from .models import ( 11 | activation, 12 | argument, 13 | code_block, 14 | code_component, 15 | composition, 16 | dependency, 17 | environment, 18 | evaluation, 19 | member, 20 | access, 21 | module, 22 | tag, 23 | trial, 24 | ) 25 | 26 | # ToDo: Slicing inference rules 27 | 28 | # Ideas 29 | # ToDo: Show complete docstrings for rules 30 | # ToDo: Show bound docstring for bound queries 31 | # ToDo: Create Prolog rules file from rule functions 32 | # ToDo: Jupyter magic for running pattern matching queries without messing with 33 | # variables 34 | # ToDo: Fallback prolog magic to Pattern matching magic if swipl is not present 35 | # ToDo: Join ModelRules using SQLAlchemy and add support for joined conditions 36 | # ToDo: Pattern matching for lists 37 | 38 | __all__ = [ 39 | "BLANK", 40 | "create_rule", 41 | "restrict_rule", 42 | "set_options_in_rule", 43 | "prolog_rule", 44 | "var", 45 | 46 | "activation", 47 | "argument", 48 | "code_block", 49 | "code_component", 50 | "composition", 51 | "dependency", 52 | "environment", 53 | "evaluation", 54 | "member", 55 | "access", 56 | "module", 57 | "tag", 58 | "trial", 59 | ] 60 | -------------------------------------------------------------------------------- /capture/noworkflow/patterns/models.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2017 Universidade Federal Fluminense (UFF) 2 | # Copyright (c) 2017 Polytechnic Institute of New York University. 3 | # This file is part of noWorkflow. 4 | # Please, consult the license terms in the LICENSE file. 5 | """Pattern Matching Models""" 6 | # pylint: disable=invalid-name 7 | 8 | from ..now.persistence.models import Activation 9 | from ..now.persistence.models import Argument 10 | from ..now.persistence.models import CodeBlock 11 | from ..now.persistence.models import CodeComponent 12 | from ..now.persistence.models import Composition 13 | from ..now.persistence.models import Dependency 14 | from ..now.persistence.models import EnvironmentAttr 15 | from ..now.persistence.models import Evaluation 16 | from ..now.persistence.models import FileAccess 17 | from ..now.persistence.models import Member 18 | from ..now.persistence.models import Module 19 | from ..now.persistence.models import Tag 20 | from ..now.persistence.models import Trial 21 | 22 | from .machinery import ModelRule 23 | 24 | 25 | activation = ModelRule(Activation) 26 | argument = ModelRule(Argument) 27 | code_block = ModelRule(CodeBlock) 28 | code_component = ModelRule(CodeComponent) 29 | composition = ModelRule(Composition) 30 | dependency = ModelRule(Dependency) 31 | environment = ModelRule(EnvironmentAttr) 32 | evaluation = ModelRule(Evaluation) 33 | access = ModelRule(FileAccess) 34 | member = ModelRule(Member) 35 | module = ModelRule(Module) 36 | tag = ModelRule(Tag) 37 | trial = ModelRule(Trial) 38 | -------------------------------------------------------------------------------- /capture/noworkflow/patterns/rules/id_rules.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2017 Universidade Federal Fluminense (UFF) 2 | # Copyright (c) 2017 Polytechnic Institute of New York University. 3 | # This file is part of noWorkflow. 4 | # Please, consult the license terms in the LICENSE file. 5 | """ID Rules""" 6 | # pylint: disable=invalid-name, redefined-builtin 7 | 8 | from ..machinery import prolog_rule, create_rule, Variable 9 | from ..models import evaluation 10 | from .helpers import _get_value, _match 11 | 12 | @prolog_rule("evaluation_code_id(TrialId, Id, CodeId) :-") 13 | @prolog_rule(" evaluation(TrialId, Id, _, CodeId, _, _).") 14 | @create_rule 15 | def evaluation_code_id(trial_id, id, code_id): 16 | """Match *CodeId* of evalation *Id* 17 | in a given trial (*TrialId*).""" 18 | return evaluation(trial_id, id, code_component_id=code_id) 19 | -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/1/step1/simulation.py: -------------------------------------------------------------------------------- 1 | import csv 2 | import sys 3 | import matplotlib.pyplot as plt 4 | from simulator import simulate 5 | 6 | def run_simulation(data_a, data_b): 7 | a = csv_read(data_a) 8 | b = csv_read(data_b) 9 | data = simulate(a, b) 10 | return data 11 | 12 | def csv_read(f): 13 | reader = csv.reader(open(f, newline=''), delimiter=':') 14 | data = [] 15 | for row in reader: 16 | data.append(row) 17 | return data 18 | 19 | def extract_column(data, column): 20 | col_data = [] 21 | for row in data: 22 | col_data.append(float(row[column])) 23 | return col_data 24 | 25 | def plot(data): 26 | #GetTemperature 27 | t = extract_column(data, 0) 28 | #GetPrecipitation 29 | p = extract_column(data, 1) 30 | plt.scatter(t, p, marker='o') 31 | plt.xlabel('Temperature') 32 | plt.ylabel('Precipitation') 33 | plt.savefig("output.png") 34 | 35 | #Main Program 36 | data_a = sys.argv[1] 37 | data_b = sys.argv[2] 38 | data = run_simulation(data_a, data_b) 39 | plot(data) 40 | -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/1/step1/simulator.py: -------------------------------------------------------------------------------- 1 | import time 2 | 3 | def simulate(a, b): 4 | time.sleep(2) 5 | data = a + b 6 | return data 7 | -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/1/step2/simulation.py: -------------------------------------------------------------------------------- 1 | import csv 2 | import sys 3 | import matplotlib.pyplot as plt 4 | from simulator import simulate 5 | 6 | def run_simulation(data_a, data_b): 7 | return simulate(csv_read(data_a), csv_read(data_b)) 8 | 9 | def csv_read(f): 10 | return list(csv.reader(open(f, newline=''), delimiter=':')) 11 | 12 | def extract_column(data, column): 13 | return [float(row[column]) for row in data] 14 | 15 | def plot(data): 16 | #GetTemperature 17 | #GetPrecipitation 18 | plt.scatter(extract_column(data, 0), extract_column(data, 1), marker='o') 19 | plt.xlabel('Temperature') 20 | plt.ylabel('Precipitation') 21 | plt.savefig("output.png") 22 | 23 | #Main Program 24 | plot(run_simulation(sys.argv[1], sys.argv[2])) 25 | -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/1/step2/simulator.py: -------------------------------------------------------------------------------- 1 | import time 2 | 3 | def simulate(a, b): 4 | time.sleep(2) 5 | data = a + b 6 | return data 7 | -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/1/step3/simulation.py: -------------------------------------------------------------------------------- 1 | import csv 2 | import sys 3 | import matplotlib.pyplot as plt 4 | from simulator import simulate 5 | 6 | def run_simulation(data_a, data_b): 7 | a = csv_read(data_a) 8 | b = csv_read(data_b) 9 | data = simulate(a, b) 10 | return data 11 | 12 | def csv_read(f): 13 | reader = csv.reader(open(f, newline=''), delimiter=':') 14 | data = [] 15 | for row in reader: 16 | data.append(row) 17 | return data 18 | 19 | def extract_column(data, column): 20 | col_data = [] 21 | for row in data: 22 | col_data.append(float(row[column])) 23 | return col_data 24 | 25 | def extract_temperature(data): 26 | return extract_column(data, 0) 27 | 28 | def extract_precipitation(data): 29 | return extract_column(dat, 1) 30 | 31 | def plot(data): 32 | t = extract_temperature(data) 33 | p = extract_precipitation(data) 34 | plt.scatter(t, p, marker='o') 35 | plt.xlabel('Temperature') 36 | plt.ylabel('Precipitation') 37 | plt.savefig("output.png") 38 | 39 | #Main Program 40 | data_a = sys.argv[1] 41 | data_b = sys.argv[2] 42 | data = run_simulation(data_a, data_b) 43 | plot(data) 44 | -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/1/step3/simulator.py: -------------------------------------------------------------------------------- 1 | import time 2 | 3 | def simulate(a, b): 4 | time.sleep(2) 5 | data = a + b 6 | return data 7 | -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/1/steps.txt: -------------------------------------------------------------------------------- 1 | >ERASE_ALL 2 | >LOAD step1 3 | $now run simulation.py data1.dat data2.dat 4 | $now run simulation_complete.py 5 | >LOAD step2 6 | $now run simulation.py data1.dat data2.dat 7 | $now restore 1 8 | $now run simulation.py data2.dat data1.dat 9 | >LOAD step3 10 | $now restore 3 11 | $now run simulation.py data1.dat data2.dat 12 | >LOAD step3 13 | $now run simulation.py data1.dat data2.dat 14 | $now run simulation_complete.py 15 | >LOAD step1 16 | $now run simulation.py data1.dat data2.dat -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2/step1/experiment.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import matplotlib.pyplot as plt 3 | from precipitation import read, prepare 4 | 5 | def bar_graph(years): 6 | global PREC, MONTHS 7 | prepare(PREC, MONTHS, years, plt) 8 | plt.savefig("out.png") 9 | 10 | MONTHS = np.arange(12) + 1 11 | d13, d14 = read('p13.dat'), read('p14.dat') 12 | PREC = prec13, prec14 = [], [] 13 | 14 | for i in MONTHS: 15 | prec13.append(sum(d13[i])) 16 | prec14.append(sum(d14[i])) 17 | 18 | bar_graph(['2013', '2014']) 19 | -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2/step1/precipitation.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python2 2 | 3 | import csv 4 | from collections import defaultdict 5 | 6 | 7 | def read(filename): 8 | result = defaultdict(list) 9 | with open(filename, 'r') as c: 10 | reader = csv.reader(c, delimiter=";") 11 | for row in reader: 12 | month = int(row[1].split('/')[1]) 13 | precipitation = float(row[3]) 14 | result[month].append(precipitation) 15 | return result 16 | 17 | 18 | def prepare(series, months, names, plt, div=.1, colors=['b', 'g', 'r']): 19 | fig, ax = plt.subplots() 20 | 21 | ax.set_ylabel('Precipitation (mm)') 22 | ax.set_xlabel('Month') 23 | ax.set_title('Precipitation by Month') 24 | ax.set_xticks(months + .5) 25 | ax.set_xticklabels(list(map(str, months))) 26 | 27 | half_div = div / 2.0 28 | width = (1.0 - div) / len(series) 29 | bars = [] 30 | for i, data in enumerate(series): 31 | bars.append(ax.bar(months + half_div + i * width, data, width, 32 | color=colors[i])) 33 | 34 | ax.legend(bars, names) 35 | 36 | __VERSION__ = "1.0.1" 37 | 38 | if __name__ == '__main__': 39 | import sys 40 | filename = sys.argv[1] 41 | month = sys.argv[2] 42 | data = read(filename) 43 | print(';'.join(map(str, data[int(month)]))) 44 | -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2/step2/experiment.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import matplotlib.pyplot as plt 3 | from precipitation import read, prepare 4 | 5 | def bar_graph(years): 6 | global PREC, MONTHS 7 | prepare(PREC, MONTHS, years, plt) 8 | plt.savefig("out.png") 9 | 10 | MONTHS = np.arange(12) + 1 11 | d12 = read('p11.dat') 12 | d13, d14 = read('p13.dat'), read('p14.dat') 13 | PREC = prec12, prec13, prec14 = [], [], [] 14 | 15 | for i in MONTHS: 16 | prec12.append(sum(d12[i])) 17 | prec13.append(sum(d13[i])) 18 | prec14.append(sum(d14[i])) 19 | 20 | bar_graph(['2012', '2013', '2014']) 21 | -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2/step2/precipitation.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python2 2 | 3 | import csv 4 | from collections import defaultdict 5 | 6 | 7 | def read(filename): 8 | result = defaultdict(list) 9 | with open(filename, 'r') as c: 10 | reader = csv.reader(c, delimiter=";") 11 | for row in reader: 12 | month = int(row[1].split('/')[1]) 13 | precipitation = float(row[3]) 14 | result[month].append(precipitation) 15 | return result 16 | 17 | 18 | def prepare(series, months, names, plt, div=.1, colors=['b', 'g', 'r']): 19 | fig, ax = plt.subplots() 20 | 21 | ax.set_ylabel('Precipitation (mm)') 22 | ax.set_xlabel('Month') 23 | ax.set_title('Precipitation by Month') 24 | ax.set_xticks(months + .5) 25 | ax.set_xticklabels(list(map(str, months))) 26 | 27 | half_div = div / 2.0 28 | width = (1.0 - div) / len(series) 29 | bars = [] 30 | for i, data in enumerate(series): 31 | bars.append(ax.bar(months + half_div + i * width, data, width, 32 | color=colors[i])) 33 | 34 | ax.legend(bars, names) 35 | 36 | __VERSION__ = "1.0.1" 37 | 38 | if __name__ == '__main__': 39 | import sys 40 | filename = sys.argv[1] 41 | month = sys.argv[2] 42 | data = read(filename) 43 | print(';'.join(map(str, data[int(month)]))) 44 | -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2/step3/experiment.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import matplotlib.pyplot as plt 3 | from precipitation import read, prepare 4 | 5 | def bar_graph(years): 6 | global PREC, MONTHS 7 | prepare(PREC, MONTHS, years, plt) 8 | plt.savefig("out.png") 9 | 10 | MONTHS = np.arange(12) + 1 11 | d12 = read('p12.dat') 12 | d13, d14 = read('p13.dat'), read('p14.dat') 13 | PREC = prec12, prec13, prec14 = [], [], [] 14 | 15 | for i in MONTHS: 16 | prec12.append(sum(d12[i])) 17 | prec13.append(sum(d13[i])) 18 | prec14.append(sum(d14[i])) 19 | 20 | bar_graph(['2012', '2013', '2014']) 21 | -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2/step3/precipitation.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python2 2 | 3 | import csv 4 | from collections import defaultdict 5 | 6 | 7 | def read(filename): 8 | result = defaultdict(list) 9 | with open(filename, 'r') as c: 10 | reader = csv.reader(c, delimiter=";") 11 | for row in reader: 12 | month = int(row[1].split('/')[1]) 13 | precipitation = float(row[3]) 14 | result[month].append(precipitation) 15 | return result 16 | 17 | 18 | def prepare(series, months, names, plt, div=.1, colors=['b', 'g', 'r']): 19 | fig, ax = plt.subplots() 20 | 21 | ax.set_ylabel('Precipitation (mm)') 22 | ax.set_xlabel('Month') 23 | ax.set_title('Precipitation by Month') 24 | ax.set_xticks(months + .5) 25 | ax.set_xticklabels(list(map(str, months))) 26 | 27 | half_div = div / 2.0 28 | width = (1.0 - div) / len(series) 29 | bars = [] 30 | for i, data in enumerate(series): 31 | bars.append(ax.bar(months + half_div + i * width, data, width, 32 | color=colors[i])) 33 | 34 | ax.legend(bars, names) 35 | 36 | __VERSION__ = "1.0.1" 37 | 38 | if __name__ == '__main__': 39 | import sys 40 | filename = sys.argv[1] 41 | month = sys.argv[2] 42 | data = read(filename) 43 | print(';'.join(map(str, data[int(month)]))) 44 | -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2/step4/experiment.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import matplotlib.pyplot as plt 3 | from precipitation import read, prepare 4 | 5 | def bar_graph(prec, months, years): 6 | prepare(prec, months, years, plt) 7 | plt.savefig("out.png") 8 | 9 | months = np.arange(12) + 1 10 | d13, d14 = read('p13.dat'), read('p14.dat') 11 | prec = prec13, prec14 = [], [] 12 | 13 | for i in months: 14 | prec13.append(sum(d13[i])) 15 | prec14.append(sum(d14[i])) 16 | 17 | bar_graph(prec, months, ['2013', '2014']) 18 | -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2/step4/precipitation.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python2 2 | 3 | import csv 4 | from collections import defaultdict 5 | 6 | 7 | def read(filename): 8 | result = defaultdict(list) 9 | with open(filename, 'r') as c: 10 | reader = csv.reader(c, delimiter=";") 11 | for row in reader: 12 | month = int(row[1].split('/')[1]) 13 | precipitation = float(row[3]) 14 | result[month].append(precipitation) 15 | return result 16 | 17 | 18 | def prepare(series, months, names, plt, div=.1, colors=['b', 'g', 'r']): 19 | fig, ax = plt.subplots() 20 | 21 | ax.set_ylabel('Precipitation (mm)') 22 | ax.set_xlabel('Month') 23 | ax.set_title('Precipitation by Month') 24 | ax.set_xticks(months + .5) 25 | ax.set_xticklabels(list(map(str, months))) 26 | 27 | half_div = div / 2.0 28 | width = (1.0 - div) / len(series) 29 | bars = [] 30 | for i, data in enumerate(series): 31 | bars.append(ax.bar(months + half_div + i * width, data, width, 32 | color=colors[i])) 33 | 34 | ax.legend(bars, names) 35 | 36 | __VERSION__ = "1.0.1" 37 | 38 | if __name__ == '__main__': 39 | import sys 40 | filename = sys.argv[1] 41 | month = sys.argv[2] 42 | data = read(filename) 43 | print(';'.join(map(str, data[int(month)]))) 44 | -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2/step5/experiment.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import matplotlib.pyplot as plt 3 | from precipitation import read, prepare 4 | 5 | def bar_graph(prec, months, years): 6 | prepare(prec, months, years, plt) 7 | plt.savefig("out.png") 8 | 9 | months = np.arange(12) + 1 10 | d12, d13, d14 = read('p12.dat'), read('p13.dat'), read('p14.dat') 11 | prec = prec12, prec13, prec14 = [], [], [] 12 | 13 | for i in months: 14 | prec12.append(sum(d12[i])) 15 | prec13.append(sum(d13[i])) 16 | prec14.append(sum(d14[i])) 17 | 18 | bar_graph(prec, months, ['2012', '2013', '2014']) 19 | -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2/step5/precipitation.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python2 2 | 3 | import csv 4 | from collections import defaultdict 5 | 6 | 7 | def read(filename): 8 | result = defaultdict(list) 9 | with open(filename, 'r') as c: 10 | reader = csv.reader(c, delimiter=";") 11 | for row in reader: 12 | month = int(row[1].split('/')[1]) 13 | precipitation = float(row[3]) 14 | result[month].append(precipitation) 15 | return result 16 | 17 | 18 | def prepare(series, months, names, plt, div=.1, colors=['b', 'g', 'r']): 19 | fig, ax = plt.subplots() 20 | 21 | ax.set_ylabel('Precipitation (mm)') 22 | ax.set_xlabel('Month') 23 | ax.set_title('Precipitation by Month') 24 | ax.set_xticks(months + .5) 25 | ax.set_xticklabels(list(map(str, months))) 26 | 27 | half_div = div / 2.0 28 | width = (1.0 - div) / len(series) 29 | bars = [] 30 | for i, data in enumerate(series): 31 | bars.append(ax.bar(months + half_div + i * width, data, width, 32 | color=colors[i])) 33 | 34 | ax.legend(bars, names) 35 | 36 | __VERSION__ = "1.0.1" 37 | 38 | if __name__ == '__main__': 39 | import sys 40 | filename = sys.argv[1] 41 | month = sys.argv[2] 42 | data = read(filename) 43 | print(';'.join(map(str, data[int(month)]))) 44 | -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2/steps.txt: -------------------------------------------------------------------------------- 1 | >ERASE_ALL 2 | >LOAD step1 3 | $now run experiment.py 4 | $now run -b experiment.py 5 | $now run -e Tracer experiment.py 6 | >LOAD step2 7 | $now run experiment.py 8 | >LOAD step3 9 | $now restore 1 10 | >LOAD step4 11 | $now run experiment.py 12 | $now restore 5 13 | $now run experiment.py 14 | >LOAD step5 15 | $now run experiment.py 16 | -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step1/anatomy1.hdr: -------------------------------------------------------------------------------- 1 | anatomy1 header dummy file -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step1/anatomy1.img: -------------------------------------------------------------------------------- 1 | anatomy1 dummy file -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step1/anatomy2.hdr: -------------------------------------------------------------------------------- 1 | anatomy2 header dummy file -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step1/anatomy2.img: -------------------------------------------------------------------------------- 1 | anatomy2 dummy file -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step1/anatomy3.hdr: -------------------------------------------------------------------------------- 1 | anatomy3 header dummy file -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step1/anatomy3.img: -------------------------------------------------------------------------------- 1 | anatomy3 dummy file -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step1/anatomy4.hdr: -------------------------------------------------------------------------------- 1 | anatomy4 header dummy file -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step1/anatomy4.img: -------------------------------------------------------------------------------- 1 | anatomy4 dummy file -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step1/experiment.py: -------------------------------------------------------------------------------- 1 | import sys 2 | from external import align_warp, reslice, softmean, slicer, convert 3 | 4 | def align_reslice(anatomy_image, reference_image): 5 | anatomy_header = anatomy_image[:-3] + "hdr" 6 | reference_header = reference_image[:-3] + "hdr" 7 | warp = align_warp(anatomy_image, anatomy_header, 8 | reference_image, reference_header) 9 | return reslice(warp) 10 | 11 | def slice_convert(atlas_image, atlas_header, coordinate): 12 | atlas_slice = slicer(atlas_image, atlas_header, coordinate) 13 | return convert(atlas_slice) 14 | 15 | def main(): 16 | reference = sys.argv[-1] 17 | anatomy_images = sys.argv[1:-1] 18 | resliced = [] 19 | for anatomy in anatomy_images: 20 | resliced += align_reslice(anatomy, reference) 21 | atlas_image, atlas_header = softmean(*resliced) 22 | for coordinate in ["x", "y", "z"]: 23 | atlas = slice_convert(atlas_image, atlas_header, coordinate) 24 | 25 | main() 26 | -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step1/reference.hdr: -------------------------------------------------------------------------------- 1 | reference header dummy file -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step1/reference.img: -------------------------------------------------------------------------------- 1 | reference dummy file -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step2/anatomy1.hdr: -------------------------------------------------------------------------------- 1 | anatomy1 header dummy file -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step2/anatomy1.img: -------------------------------------------------------------------------------- 1 | anatomy1 dummy file -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step2/anatomy2.hdr: -------------------------------------------------------------------------------- 1 | anatomy2 header dummy file -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step2/anatomy2.img: -------------------------------------------------------------------------------- 1 | anatomy2 dummy file -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step2/anatomy3.hdr: -------------------------------------------------------------------------------- 1 | anatomy3 header dummy file -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step2/anatomy3.img: -------------------------------------------------------------------------------- 1 | anatomy3 dummy file -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step2/anatomy4.hdr: -------------------------------------------------------------------------------- 1 | anatomy4 header dummy file -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step2/anatomy4.img: -------------------------------------------------------------------------------- 1 | anatomy4 dummy file -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step2/atlas.hdr: -------------------------------------------------------------------------------- 1 | atlas header -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step2/atlas.img: -------------------------------------------------------------------------------- 1 | atlas image -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step2/atlax-x.gif: -------------------------------------------------------------------------------- 1 | atlax-x.pgm -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step2/atlax-x.pgm: -------------------------------------------------------------------------------- 1 | atlas x -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step2/atlax-y.gif: -------------------------------------------------------------------------------- 1 | atlax-y.pgm -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step2/atlax-y.pgm: -------------------------------------------------------------------------------- 1 | atlas y -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step2/atlax-z.gif: -------------------------------------------------------------------------------- 1 | atlax-z.pgm -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step2/atlax-z.pgm: -------------------------------------------------------------------------------- 1 | atlas z -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step2/convert.py: -------------------------------------------------------------------------------- 1 | # Dummy calls for representing openings 2 | 3 | def pgmtoppm(atlas_slice): 4 | result = atlas_slice[:-3] + "ppm" 5 | with open(atlas_slice, "rb") as aslice, \ 6 | open(result, "w") as gif: 7 | gif.write(atlas_slice + ".ppm") 8 | return result 9 | 10 | def pnmtojpeg(ppm_slice): 11 | result = ppm_slice[:-3] + "jpg" 12 | with open(ppm_slice, "rb") as aslice, \ 13 | open(result, "w") as gif: 14 | gif.write(ppm_slice + ".jpg") 15 | return result 16 | -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step2/experiment.py: -------------------------------------------------------------------------------- 1 | import sys 2 | from external import align_warp, reslice, softmean, slicer 3 | from convert import pgmtoppm, pnmtojpeg 4 | 5 | def align_reslice(anatomy_image, reference_image): 6 | anatomy_header = anatomy_image[:-3] + "hdr" 7 | reference_header = reference_image[:-3] + "hdr" 8 | warp = align_warp(anatomy_image, anatomy_header, 9 | reference_image, reference_header) 10 | return reslice(warp) 11 | 12 | def slice_convert(atlas_image, atlas_header, coordinate): 13 | atlas_slice = slicer(atlas_image, atlas_header, coordinate) 14 | return pnmtojpeg(pgmtoppm(atlas_slice)) 15 | 16 | def main(): 17 | reference = sys.argv[-1] 18 | anatomy_images = sys.argv[1:-1] 19 | resliced = [] 20 | for anatomy in anatomy_images: 21 | resliced += align_reslice(anatomy, reference) 22 | atlas_image, atlas_header = softmean(*resliced) 23 | for coordinate in ["x", "y", "z"]: 24 | atlas = slice_convert(atlas_image, atlas_header, coordinate) 25 | 26 | main() 27 | -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step2/experiment2.py: -------------------------------------------------------------------------------- 1 | def filter_five_out(value): 2 | if value == 5: 3 | return -1 4 | return value 5 | 6 | def filter_even_out(value): 7 | if value % 2 == 0: 8 | return -1 9 | return value 10 | 11 | 12 | with open("result.txt", "w") as result: 13 | for i in range(10): 14 | value = filter_even_out(i) 15 | value = filter_five_out(value) 16 | if value != -1: 17 | result.write(str(value)) 18 | -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step2/reference.hdr: -------------------------------------------------------------------------------- 1 | reference header dummy file -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step2/reference.img: -------------------------------------------------------------------------------- 1 | reference dummy file -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step2/reslice1.hdr: -------------------------------------------------------------------------------- 1 | header 1 -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step2/reslice1.img: -------------------------------------------------------------------------------- 1 | image 1 -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step2/reslice2.hdr: -------------------------------------------------------------------------------- 1 | header 2 -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step2/reslice2.img: -------------------------------------------------------------------------------- 1 | image 2 -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step2/reslice3.hdr: -------------------------------------------------------------------------------- 1 | header 3 -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step2/reslice3.img: -------------------------------------------------------------------------------- 1 | image 3 -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step2/reslice4.hdr: -------------------------------------------------------------------------------- 1 | header 4 -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step2/reslice4.img: -------------------------------------------------------------------------------- 1 | image 4 -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step2/warp.warp: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step3/anatomy1.hdr: -------------------------------------------------------------------------------- 1 | anatomy1 header dummy file -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step3/anatomy1.img: -------------------------------------------------------------------------------- 1 | anatomy1 dummy file -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step3/anatomy2.hdr: -------------------------------------------------------------------------------- 1 | anatomy2 header dummy file -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step3/anatomy2.img: -------------------------------------------------------------------------------- 1 | anatomy2 dummy file -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step3/anatomy3.hdr: -------------------------------------------------------------------------------- 1 | anatomy3 header dummy file -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step3/anatomy3.img: -------------------------------------------------------------------------------- 1 | anatomy3 dummy file -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step3/anatomy4.hdr: -------------------------------------------------------------------------------- 1 | anatomy4 header dummy file -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step3/anatomy4.img: -------------------------------------------------------------------------------- 1 | anatomy4 dummy file -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step3/atlas.hdr: -------------------------------------------------------------------------------- 1 | atlas header -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step3/atlas.img: -------------------------------------------------------------------------------- 1 | atlas image -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step3/atlax-x.gif: -------------------------------------------------------------------------------- 1 | atlax-x.pgm -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step3/atlax-x.jpg: -------------------------------------------------------------------------------- 1 | atlax-x.ppm.jpg -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step3/atlax-x.pgm: -------------------------------------------------------------------------------- 1 | atlas x -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step3/atlax-x.ppm: -------------------------------------------------------------------------------- 1 | atlax-x.pgm.ppm -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step3/atlax-y.gif: -------------------------------------------------------------------------------- 1 | atlax-y.pgm -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step3/atlax-y.jpg: -------------------------------------------------------------------------------- 1 | atlax-y.ppm.jpg -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step3/atlax-y.pgm: -------------------------------------------------------------------------------- 1 | atlas y -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step3/atlax-y.ppm: -------------------------------------------------------------------------------- 1 | atlax-y.pgm.ppm -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step3/atlax-z.gif: -------------------------------------------------------------------------------- 1 | atlax-z.pgm -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step3/atlax-z.jpg: -------------------------------------------------------------------------------- 1 | atlax-z.ppm.jpg -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step3/atlax-z.pgm: -------------------------------------------------------------------------------- 1 | atlas z -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step3/atlax-z.ppm: -------------------------------------------------------------------------------- 1 | atlax-z.pgm.ppm -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step3/convert.py: -------------------------------------------------------------------------------- 1 | # Dummy calls for representing openings 2 | 3 | def pgmtoppm(atlas_slice): 4 | result = atlas_slice[:-3] + "ppm" 5 | with open(atlas_slice, "rb") as aslice, \ 6 | open(result, "w") as gif: 7 | gif.write(atlas_slice + ".ppm") 8 | return result 9 | 10 | def pnmtojpeg(ppm_slice): 11 | result = ppm_slice[:-3] + "jpg" 12 | with open(ppm_slice, "rb") as aslice, \ 13 | open(result, "w") as gif: 14 | gif.write(ppm_slice + ".jpg") 15 | return result 16 | -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step3/experiment.py: -------------------------------------------------------------------------------- 1 | import sys 2 | from external import align_warp, reslice, softmean, slicer 3 | from convert import pgmtoppm, pnmtojpeg 4 | 5 | def align_reslice(anatomy_image, reference_image): 6 | anatomy_header = anatomy_image[:-3] + "hdr" 7 | reference_header = reference_image[:-3] + "hdr" 8 | warp = align_warp(anatomy_image, anatomy_header, 9 | reference_image, reference_header) 10 | return reslice(warp) 11 | 12 | def slice_convert(atlas_image, atlas_header, coordinate): 13 | atlas_slice = slicer(atlas_image, atlas_header, coordinate) 14 | return pnmtojpeg(pgmtoppm(atlas_slice)) 15 | 16 | def main(): 17 | reference = sys.argv[-1] 18 | anatomy_images = sys.argv[1:-1] 19 | resliced = [] 20 | for anatomy in anatomy_images: 21 | resliced += align_reslice(anatomy, reference) 22 | atlas_image, atlas_header = softmean(*resliced) 23 | for coordinate in []: 24 | atlas = slice_convert(atlas_image, atlas_header, coordinate) 25 | 26 | main() 27 | -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step3/experiment2.py: -------------------------------------------------------------------------------- 1 | def filter_five_out(value): 2 | if value == 5: 3 | return -1 4 | return value 5 | 6 | def filter_even_out(value): 7 | if value % 2 == 0: 8 | return -1 9 | return value 10 | 11 | 12 | with open("result.txt", "w") as result: 13 | for i in range(10): 14 | value = filter_even_out(i) 15 | value = filter_five_out(value) 16 | if value != -1: 17 | result.write(str(value)) 18 | -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step3/reference.hdr: -------------------------------------------------------------------------------- 1 | reference header dummy file -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step3/reference.img: -------------------------------------------------------------------------------- 1 | reference dummy file -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step3/reslice1.hdr: -------------------------------------------------------------------------------- 1 | header 1 -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step3/reslice1.img: -------------------------------------------------------------------------------- 1 | image 1 -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step3/reslice2.hdr: -------------------------------------------------------------------------------- 1 | header 2 -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step3/reslice2.img: -------------------------------------------------------------------------------- 1 | image 2 -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step3/reslice3.hdr: -------------------------------------------------------------------------------- 1 | header 3 -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step3/reslice3.img: -------------------------------------------------------------------------------- 1 | image 3 -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step3/reslice4.hdr: -------------------------------------------------------------------------------- 1 | header 4 -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step3/reslice4.img: -------------------------------------------------------------------------------- 1 | image 4 -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step3/result.txt: -------------------------------------------------------------------------------- 1 | 1379 -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step3/warp.warp: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step4/anatomy1.hdr: -------------------------------------------------------------------------------- 1 | anatomy1 header dummy file -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step4/anatomy1.img: -------------------------------------------------------------------------------- 1 | anatomy1 dummy file -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step4/anatomy2.hdr: -------------------------------------------------------------------------------- 1 | anatomy2 header dummy file -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step4/anatomy2.img: -------------------------------------------------------------------------------- 1 | anatomy2 dummy file -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step4/anatomy3.hdr: -------------------------------------------------------------------------------- 1 | anatomy3 header dummy file -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step4/anatomy3.img: -------------------------------------------------------------------------------- 1 | anatomy3 dummy file -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step4/anatomy4.hdr: -------------------------------------------------------------------------------- 1 | anatomy4 header dummy file -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step4/anatomy4.img: -------------------------------------------------------------------------------- 1 | anatomy4 dummy file -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step4/atlas.hdr: -------------------------------------------------------------------------------- 1 | atlas header -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step4/atlas.img: -------------------------------------------------------------------------------- 1 | atlas image -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step4/atlax-x.gif: -------------------------------------------------------------------------------- 1 | atlax-x.pgm -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step4/atlax-x.jpg: -------------------------------------------------------------------------------- 1 | atlax-x.ppm.jpg -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step4/atlax-x.pgm: -------------------------------------------------------------------------------- 1 | atlas x -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step4/atlax-x.ppm: -------------------------------------------------------------------------------- 1 | atlax-x.pgm.ppm -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step4/atlax-y.gif: -------------------------------------------------------------------------------- 1 | atlax-y.pgm -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step4/atlax-y.jpg: -------------------------------------------------------------------------------- 1 | atlax-y.ppm.jpg -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step4/atlax-y.pgm: -------------------------------------------------------------------------------- 1 | atlas y -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step4/atlax-y.ppm: -------------------------------------------------------------------------------- 1 | atlax-y.pgm.ppm -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step4/atlax-z.gif: -------------------------------------------------------------------------------- 1 | atlax-z.pgm -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step4/atlax-z.jpg: -------------------------------------------------------------------------------- 1 | atlax-z.ppm.jpg -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step4/atlax-z.pgm: -------------------------------------------------------------------------------- 1 | atlas z -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step4/atlax-z.ppm: -------------------------------------------------------------------------------- 1 | atlax-z.pgm.ppm -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step4/convert.py: -------------------------------------------------------------------------------- 1 | # Dummy calls for representing openings 2 | 3 | def pgmtoppm(atlas_slice): 4 | result = atlas_slice[:-3] + "ppm" 5 | with open(atlas_slice, "rb") as aslice, \ 6 | open(result, "w") as gif: 7 | gif.write(atlas_slice + ".ppm") 8 | return result 9 | 10 | def pnmtojpeg(ppm_slice): 11 | result = ppm_slice[:-3] + "jpg" 12 | with open(ppm_slice, "rb") as aslice, \ 13 | open(result, "w") as gif: 14 | gif.write(ppm_slice + ".jpg") 15 | return result 16 | -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step4/experiment.py: -------------------------------------------------------------------------------- 1 | import sys 2 | from external import align_warp, reslice, softmean, slicer 3 | from convert import pgmtoppm, pnmtojpeg 4 | 5 | def align_reslice(anatomy_image, reference_image): 6 | anatomy_header = anatomy_image[:-3] + "hdr" 7 | reference_header = reference_image[:-3] + "hdr" 8 | warp = align_warp(anatomy_image, anatomy_header, 9 | reference_image, reference_header) 10 | return reslice(warp) 11 | 12 | def slice_convert(atlas_image, atlas_header, coordinate): 13 | atlas_slice = slicer(atlas_image, atlas_header, coordinate) 14 | return pnmtojpeg(pgmtoppm(atlas_slice)) 15 | 16 | def main(): 17 | reference = sys.argv[-1] 18 | anatomy_images = sys.argv[1:-1] 19 | resliced = [] 20 | for anatomy in anatomy_images: 21 | resliced += align_reslice(anatomy, reference) 22 | atlas_image, atlas_header = softmean(*resliced) 23 | for coordinate in error: 24 | atlas = slice_convert(atlas_image, atlas_header, coordinate) 25 | 26 | main() 27 | -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step4/experiment2.py: -------------------------------------------------------------------------------- 1 | def filter_five_out(value): 2 | if value == 5: 3 | return -1 4 | return value 5 | 6 | def filter_odd_out(value): 7 | if value % 2 == 1: 8 | return -1 9 | return value 10 | 11 | 12 | with open("result.txt", "w") as result: 13 | for i in range(10): 14 | value = filter_odd_out(i) 15 | value = filter_five_out(value) 16 | if value != -1: 17 | result.write(str(value)) 18 | -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step4/reference.hdr: -------------------------------------------------------------------------------- 1 | reference header dummy file -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step4/reference.img: -------------------------------------------------------------------------------- 1 | reference dummy file -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step4/reslice1.hdr: -------------------------------------------------------------------------------- 1 | header 1 -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step4/reslice1.img: -------------------------------------------------------------------------------- 1 | image 1 -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step4/reslice2.hdr: -------------------------------------------------------------------------------- 1 | header 2 -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step4/reslice2.img: -------------------------------------------------------------------------------- 1 | image 2 -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step4/reslice3.hdr: -------------------------------------------------------------------------------- 1 | header 3 -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step4/reslice3.img: -------------------------------------------------------------------------------- 1 | image 3 -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step4/reslice4.hdr: -------------------------------------------------------------------------------- 1 | header 4 -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step4/reslice4.img: -------------------------------------------------------------------------------- 1 | image 4 -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step4/result.txt: -------------------------------------------------------------------------------- 1 | 1379 -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step4/warp.warp: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step5/experiment2.py: -------------------------------------------------------------------------------- 1 | def filter_five_out(value): 2 | if value == 5: 3 | return -1 4 | return value 5 | 6 | def filter_even_out(value): 7 | if value % 2 == 0: 8 | return -1 9 | return value 10 | 11 | 12 | with open("result.txt", "w") as result: 13 | for i in range(10): 14 | value = filter_even_out(i) 15 | if value == -1: 16 | continue 17 | value = filter_five_out(value) 18 | if value != -1: 19 | continue 20 | result.write(str(value)) 21 | -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step5/result.txt: -------------------------------------------------------------------------------- 1 | 02468 -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step6/experiment2.py: -------------------------------------------------------------------------------- 1 | def filter_five_out(value): 2 | if value == 5: 3 | return -1 4 | return value 5 | 6 | def filter_odd_out(value): 7 | if value % 2 == 1: 8 | return -1 9 | return value 10 | 11 | 12 | with open("result.txt", "w") as result: 13 | for i in range(10): 14 | value = filter_odd_out(i) 15 | if value == -1: 16 | continue 17 | value = filter_five_out(value) 18 | if value == -1: 19 | continue 20 | result.write(str(value)) 21 | -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/step6/result.txt: -------------------------------------------------------------------------------- 1 | 02468 -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_ipaw_paper/steps.txt: -------------------------------------------------------------------------------- 1 | >ERASE_ALL 2 | >LOAD step1 3 | $now run experiment.py anatomy1.img anatomy2.img anatomy3.img anatomy4.img reference.img 4 | >LOAD step2 5 | $now run -b experiment.py anatomy1.img anatomy2.img anatomy3.img anatomy4.img reference.img 6 | $now run -b experiment2.py 7 | $now run -b experiment.py anatomy1.img anatomy2.img anatomy3.img anatomy4.img reference.img 8 | >LOAD step3 9 | $now restore 2 10 | $now run -b experiment.py anatomy1.img anatomy2.img anatomy3.img anatomy4.img reference.img 11 | >LOAD step4 12 | $now run -b experiment.py anatomy1.img anatomy2.img anatomy3.img anatomy4.img reference.img 13 | $now run -b experiment2.py 14 | $now restore 3 -a 15 | >LOAD step5 16 | $now run -b experiment2.py 17 | $now restore 8 -a 18 | >LOAD step6 19 | $now run -b experiment2.py 20 | -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/2016_scipyla/steps.txt: -------------------------------------------------------------------------------- 1 | >ERASE_ALL 2 | >LOAD step1 3 | -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/annual_precipitation/step1/experiment.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | from precipitation import read, sum_by_month 3 | from precipitation import create_bargraph 4 | 5 | months = np.arange(12) + 1 6 | d13, d14 = read("p13.dat"), read("p14.dat") 7 | prec13 = sum_by_month(d13, months) 8 | prec14 = sum_by_month(d14, months) 9 | 10 | create_bargraph("out.png", months, 11 | ["2013", "2014"], prec13, prec14) 12 | -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/annual_precipitation/step2/experiment.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | from precipitation import read, sum_by_month 3 | from precipitation import create_bargraph 4 | 5 | months = np.arange(12) + 1 6 | d12, d13, d14 = read("p12.dat"), read("p13.dat"), read("p14.dat") 7 | prec12 = sum_by_month(d12, months) 8 | prec13 = sum_by_month(d13, months) 9 | prec14 = sum_by_month(d14, months) 10 | 11 | create_bargraph("out.png", months, 12 | ["2012", "2013", "2014"], prec12, prec13, prec14) 13 | -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/annual_precipitation/step2/out.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/capture/noworkflow/resources/demo/annual_precipitation/step2/out.png -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/annual_precipitation/step3/experiment.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | from precipitation import read, sum_by_month 3 | from precipitation import create_bargraph 4 | 5 | months = np.arange(12) + 1 6 | d12, d13, d14 = read("p12.dat"), read("p13.dat"), read("p14.dat") 7 | d15 = read("p15.dat") 8 | prec12 = sum_by_month(d12, months) 9 | prec13 = sum_by_month(d13, months) 10 | prec14 = sum_by_month(d14, months) 11 | 12 | create_bargraph("out.png", months, 13 | ["2012", "2013", "2014"], prec12, prec13, prec14) 14 | -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/annual_precipitation/step3/out.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/capture/noworkflow/resources/demo/annual_precipitation/step3/out.png -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/annual_precipitation/step4/experiment.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import numpy as np 3 | from precipitation import read, sum_by_month 4 | from precipitation import write, remove_outliers 5 | from precipitation import create_bargraph 6 | 7 | months = np.arange(12) + 1 8 | d13, d14 = read("p13.dat"), read("p14.dat") 9 | 10 | for i in range(int(sys.argv[1])): 11 | write("temp13.dat", remove_outliers(d13), 2013) 12 | write("temp14.dat", remove_outliers(d14), 2014) 13 | d13, d14 = read("temp13.dat"), read("temp14.dat") 14 | 15 | prec13 = sum_by_month(d13, months) 16 | prec14 = sum_by_month(d14, months) 17 | 18 | create_bargraph("out.png", months, 19 | ["2013", "2014"], prec13, prec14) 20 | -------------------------------------------------------------------------------- /capture/noworkflow/resources/demo/annual_precipitation/steps.txt: -------------------------------------------------------------------------------- 1 | >ERASE_ALL 2 | >LOAD step1 3 | $now run experiment.py 4 | >LOAD step2 5 | $now run -b experiment.py 6 | >LOAD step3 7 | $now restore 1 8 | >LOAD step4 9 | $now run -b experiment.py 2 10 | $now run -b experiment.py 1 11 | -------------------------------------------------------------------------------- /capture/noworkflow/resources/version.txt: -------------------------------------------------------------------------------- 1 | 2.0.1 -------------------------------------------------------------------------------- /capture/noworkflow/tests/cross_version_test.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2015 Universidade Federal Fluminense (UFF) 2 | # Copyright (c) 2015 Polytechnic Institute of New York University. 3 | # This file is part of noWorkflow. 4 | # Please, consult the license terms in the LICENSE file. 5 | """Test now.cross_version module""" 6 | from __future__ import (absolute_import, print_function, 7 | division, unicode_literals) 8 | 9 | import unittest 10 | from ..now.utils.cross_version import cross_compile 11 | 12 | 13 | class TestCrossVersion(unittest.TestCase): 14 | """TestCase for now.cross_version module""" 15 | 16 | def test_cross_compile(self): 17 | """Check if cross_compile behavior matches compile behavior""" 18 | code = b"a = 2" 19 | expected = compile(code, "name", "exec") 20 | result = cross_compile(code, "name", "exec") 21 | args = [ 22 | "co_argcount", "co_cellvars", "co_code", "co_consts", 23 | "co_filename", "co_firstlineno", "co_freevars", "co_lnotab", 24 | "co_name", "co_names", "co_nlocals", "co_stacksize", "co_varnames" 25 | ] 26 | for arg in args: 27 | self.assertEqual(getattr(expected, arg), getattr(result, arg)) 28 | # On Python 2: result.co_flags != expected.co_flags 29 | -------------------------------------------------------------------------------- /capture/noworkflow/tests/dependency/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2017 Universidade Federal Fluminense (UFF) 2 | # Copyright (c) 2017 Polytechnic Institute of New York University. 3 | # This file is part of noWorkflow. 4 | # Please, consult the license terms in the LICENSE file. 5 | """Test dependency graph creation""" 6 | 7 | from __future__ import (absolute_import, print_function, 8 | division) 9 | 10 | from .test_default_clusterizer import TestClusterizer 11 | from .test_dependency_clusterizer import TestDependencyClusterizer 12 | from .test_activation_clusterizer import TestActivationClusterizer 13 | from .test_prospective_clusterizer import TestProspectiveClusterizer 14 | from .test_clusterizer_config import TestClusterizerConfig 15 | 16 | __all__ = [ 17 | "TestClusterizer", 18 | "TestDependencyClusterizer", 19 | "TestActivationClusterizer", 20 | "TestProspectiveClusterizer", 21 | "TestClusterizerConfig", 22 | ] 23 | -------------------------------------------------------------------------------- /capture/noworkflow/tests/examples/modules.py: -------------------------------------------------------------------------------- 1 | 2 | import ast 3 | from collections import OrderedDict 4 | from script import f 5 | -------------------------------------------------------------------------------- /capture/noworkflow/tests/examples/script.py: -------------------------------------------------------------------------------- 1 | 2 | def f(x): 3 | pass 4 | 5 | __version__ = "1.0.2" 6 | -------------------------------------------------------------------------------- /capture/noworkflow/tests/helpers/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/capture/noworkflow/tests/helpers/__init__.py -------------------------------------------------------------------------------- /capture/noworkflow/tests/prov_definition/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2016 Universidade Federal Fluminense (UFF) 2 | # Copyright (c) 2016 Polytechnic Institute of New York University. 3 | # This file is part of noWorkflow. 4 | # Please, consult the license terms in the LICENSE file. 5 | """Test definition provenance collection""" 6 | 7 | from __future__ import (absolute_import, print_function, 8 | division) 9 | 10 | from .test_code_block_definition import TestCodeBlockDefinition 11 | from .test_code_component_definition import TestCodeComponentDefinition 12 | from .test_reconstruction import TestReconstruction 13 | 14 | __all__ = [ 15 | "TestCodeBlockDefinition", 16 | "TestCodeComponentDefinition", 17 | "TestReconstruction", 18 | ] 19 | -------------------------------------------------------------------------------- /capture/noworkflow/tests/prov_execution/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2016 Universidade Federal Fluminense (UFF) 2 | # Copyright (c) 2016 Polytechnic Institute of New York University. 3 | # This file is part of noWorkflow. 4 | # Please, consult the license terms in the LICENSE file. 5 | """Test execution provenance collection""" 6 | 7 | from __future__ import (absolute_import, print_function, 8 | division) 9 | 10 | from .test_script import TestScript 11 | from .test_class_execution import TestClassExecution 12 | from .test_stmt_execution import TestStmtExecution 13 | from .test_expr_execution import TestExprExecution 14 | from .test_depth_execution import TestDepthExecution 15 | 16 | __all__ = [ 17 | "TestScript", 18 | "TestClassExecution", 19 | "TestStmtExecution", 20 | "TestExprExecution", 21 | "TestDepthExecution", 22 | ] 23 | -------------------------------------------------------------------------------- /capture/run_tests.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2016 Universidade Federal Fluminense (UFF) 2 | # Copyright (c) 2016 Polytechnic Institute of New York University. 3 | # This file is part of noWorkflow. 4 | # Please, consult the license terms in the LICENSE file. 5 | 6 | import unittest 7 | from noworkflow.tests import * 8 | 9 | 10 | if __name__ == "__main__": 11 | unittest.main() 12 | -------------------------------------------------------------------------------- /capture/setup.cfg: -------------------------------------------------------------------------------- 1 | [bdist_wheel] 2 | universal=1 -------------------------------------------------------------------------------- /docs/Disserta__o___Eduardo_Jandre.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/docs/Disserta__o___Eduardo_Jandre.pdf -------------------------------------------------------------------------------- /docs/info.txt: -------------------------------------------------------------------------------- 1 | These docs define how modules are versioned in python: 2 | 3 | - Where to define version numbers: http://www.python.org/dev/peps/pep-0396/ 4 | - How to define version numbers: http://www.python.org/dev/peps/pep-0386/ 5 | - Metadata definition of packages: http://www.python.org/dev/peps/pep-0345/ -------------------------------------------------------------------------------- /docs/ipaw2014.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/docs/ipaw2014.pdf -------------------------------------------------------------------------------- /docs/ipaw2014.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/docs/ipaw2014.pptx -------------------------------------------------------------------------------- /docs/ipaw2016a.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/docs/ipaw2016a.pdf -------------------------------------------------------------------------------- /docs/ipaw2016a_presentation.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/docs/ipaw2016a_presentation.pdf -------------------------------------------------------------------------------- /docs/ipaw2016a_presentation.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/docs/ipaw2016a_presentation.pptx -------------------------------------------------------------------------------- /docs/ipaw2016b.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/docs/ipaw2016b.pdf -------------------------------------------------------------------------------- /docs/ipaw2016b_lightning_talk.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/docs/ipaw2016b_lightning_talk.pdf -------------------------------------------------------------------------------- /docs/ipaw2016b_lightning_talk.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/docs/ipaw2016b_lightning_talk.pptx -------------------------------------------------------------------------------- /docs/ipaw2016b_poster.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/docs/ipaw2016b_poster.pptx -------------------------------------------------------------------------------- /docs/ipaw2016c.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/docs/ipaw2016c.pdf -------------------------------------------------------------------------------- /docs/ipaw2016c_lightning_talk.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/docs/ipaw2016c_lightning_talk.pdf -------------------------------------------------------------------------------- /docs/keynote bresci 2017.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/docs/keynote bresci 2017.pdf -------------------------------------------------------------------------------- /docs/noworkflow.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/docs/noworkflow.pptx -------------------------------------------------------------------------------- /docs/tapp2015.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/docs/tapp2015.pdf -------------------------------------------------------------------------------- /docs/tapp2015.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/docs/tapp2015.pptx -------------------------------------------------------------------------------- /docs/tapp_2015_poster.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/docs/tapp_2015_poster.pptx -------------------------------------------------------------------------------- /docs/tcc-vynicius.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/docs/tcc-vynicius.pdf -------------------------------------------------------------------------------- /docs/vldb2017.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/docs/vldb2017.pdf -------------------------------------------------------------------------------- /history/david.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/history/david.jpg -------------------------------------------------------------------------------- /history/fernando.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/history/fernando.jpg -------------------------------------------------------------------------------- /history/history.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/history/history.png -------------------------------------------------------------------------------- /history/history.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/history/history.zip -------------------------------------------------------------------------------- /history/joao.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/history/joao.jpg -------------------------------------------------------------------------------- /history/juliana.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/history/juliana.jpg -------------------------------------------------------------------------------- /history/leo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/history/leo.jpg -------------------------------------------------------------------------------- /history/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "history", 3 | "lockfileVersion": 3, 4 | "requires": true, 5 | "packages": {} 6 | } 7 | -------------------------------------------------------------------------------- /history/paper.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/history/paper.png -------------------------------------------------------------------------------- /history/svgwrite_title.py: -------------------------------------------------------------------------------- 1 | from svgwrite.base import BaseElement 2 | 3 | class Title(BaseElement): 4 | elementname = 'title' 5 | def __init__(self, title, *args, **kwargs): 6 | super(Title, self).__init__(*args, **kwargs) 7 | self.set_desc(title=title) -------------------------------------------------------------------------------- /history/vanessa.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/history/vanessa.jpg -------------------------------------------------------------------------------- /npm/lerna.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": [ 3 | "packages/*" 4 | ], 5 | "version": "independent", 6 | "$schema": "node_modules/lerna/schemas/lerna-schema.json" 7 | } 8 | -------------------------------------------------------------------------------- /npm/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "devDependencies": { 4 | "lerna": "^8.1.8" 5 | }, 6 | "scripts": { 7 | "build": "lerna run build" 8 | }, 9 | "browser": { 10 | "fs": false, 11 | "os": false, 12 | "path": false, 13 | "child_process": false 14 | }, 15 | "workspaces": [ 16 | "packages/*" 17 | ], 18 | "name": "npm" 19 | } 20 | -------------------------------------------------------------------------------- /npm/packages/history/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@noworkflow/history", 3 | "version": "0.0.11", 4 | "description": "noWorkflow - History Graph", 5 | "main": "lib/index.js", 6 | "types": "lib/index.d.ts", 7 | "files": [ 8 | "lib/*.d.ts", 9 | "lib/*.js", 10 | "style/*.css" 11 | ], 12 | "directories": { 13 | "lib": "lib/", 14 | "style": "style/" 15 | }, 16 | "dependencies": { 17 | "@noworkflow/utils": "0.0.9", 18 | "d3": "^7.9.0", 19 | "file-saver": "^2.0.5" 20 | }, 21 | "devDependencies": { 22 | "@types/d3": "^7.4.3", 23 | "@types/file-saver": "^2.0.1", 24 | "rimraf": "^6.0.1", 25 | "typescript": "^5.5.4" 26 | }, 27 | "scripts": { 28 | "build": "tsc", 29 | "clean": "rimraf lib" 30 | }, 31 | "repository": { 32 | "type": "git", 33 | "url": "https://github.com/gems-uff/noworkflow.git" 34 | }, 35 | "author": "Joao Felipe Pimentel ", 36 | "license": "MIT", 37 | "bugs": { 38 | "url": "https://github.com/gems-uff/noworkflow/issues" 39 | }, 40 | "browser": { 41 | "fs": false, 42 | "os": false, 43 | "path": false, 44 | "child_process": false 45 | }, 46 | "homepage": "http://gems-uff.github.io/noworkflow", 47 | "outputs": [ 48 | "lib" 49 | ] 50 | } 51 | -------------------------------------------------------------------------------- /npm/packages/history/src/config.ts: -------------------------------------------------------------------------------- 1 | import { 2 | BaseType as d3_BaseType, 3 | Selection as d3_Selection, 4 | } from 'd3-selection'; 5 | 6 | import {HistoryGraph} from './graph'; 7 | import {VisibleHistoryNode} from './structures'; 8 | 9 | 10 | export 11 | interface HistoryConfig { 12 | customSelectNode: (g: HistoryGraph, d: VisibleHistoryNode) => boolean; 13 | customCtrlClick: (g: HistoryGraph, d: VisibleHistoryNode) => boolean; 14 | customSize: (g: HistoryGraph) => number[]; 15 | customForm: (g: HistoryGraph, form: d3_Selection) => void; 16 | customWindowTabCommand: (trialIdSimplified : string, trialId : string, command: string) => boolean; 17 | 18 | hintMessage: string; 19 | 20 | width: number; 21 | height: number; 22 | 23 | radius: number; 24 | moveX: number; 25 | moveY: number; 26 | moveY2: number; 27 | spacing: number; 28 | margin: number; 29 | 30 | fontSize: number; 31 | useTooltip: boolean; 32 | } 33 | 34 | export 35 | interface HistoryState { 36 | selectedNode: VisibleHistoryNode | null; 37 | mouseDownNode: VisibleHistoryNode | null; 38 | justScale: boolean; 39 | } 40 | -------------------------------------------------------------------------------- /npm/packages/history/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './config'; 2 | export * from './structures'; 3 | export * from './graph'; -------------------------------------------------------------------------------- /npm/packages/history/src/structures.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * HistoryNodeData represents either a trial or a summarized version node 3 | * Some attributes exist only when it is a trial 4 | */ 5 | export 6 | interface HistoryNodeData { 7 | /* Shared attribute */ 8 | id: number; 9 | display: string; 10 | parent_id: number; 11 | level: number; 12 | status: string; 13 | 14 | /* Only when HistoryNodeData acts as a summarized node */ 15 | trials?: HistoryNodeData[]; 16 | } 17 | 18 | export 19 | interface HistoryTrialNodeData extends HistoryNodeData { 20 | /* Trial attributes */ 21 | script: string; 22 | command: string; 23 | path: string; 24 | status: string; 25 | modules_inherited_from_trial_id: number; 26 | main_id: number; 27 | 28 | /* Extra */ 29 | code_hash:string; 30 | duration_text: string; 31 | tooltip: string; 32 | str_start: string; 33 | str_finish: string; 34 | } 35 | 36 | export 37 | interface HistoryEdgeData { 38 | level: number; 39 | right: number; 40 | source: number; 41 | target: number; 42 | } 43 | 44 | export 45 | interface HistoryGraphData { 46 | edges: HistoryEdgeData[]; 47 | nodes: HistoryNodeData[]; 48 | scripts: string[]; 49 | width: number; 50 | height: number; 51 | } 52 | 53 | export 54 | interface VisibleHistoryNode { 55 | id: number; 56 | x: number; 57 | y: number; 58 | title: string; 59 | display: string; 60 | info: HistoryNodeData; 61 | radius: number; 62 | gradient: boolean; 63 | status: string; 64 | 65 | trials?: HistoryNodeData[]; 66 | tooltip?: string; 67 | } 68 | 69 | export 70 | interface VisibleHistoryEdge { 71 | id: string; 72 | level: number; 73 | right: number; 74 | source: VisibleHistoryNode; 75 | target: VisibleHistoryNode; 76 | } -------------------------------------------------------------------------------- /npm/packages/history/style/index.css: -------------------------------------------------------------------------------- 1 | .history-toolbar { 2 | float: left; 3 | overflow: none; 4 | z-index: 3; 5 | position: absolute; 6 | } 7 | 8 | .history-toolbar .buttons { 9 | height: 30px; 10 | display: inline-block; 11 | margin-left: 8px; 12 | } 13 | 14 | .history-toolbar .buttons > input { 15 | height: 30px; 16 | } 17 | 18 | .history-toolbar .buttons > input[type=checkbox] { 19 | display: none 20 | } 21 | 22 | .history-toolbar .buttons > label, .history-toolbar > div > a { 23 | margin: 8px 8px 8px 0; 24 | } 25 | 26 | .history-toolbar .buttons > input[type=checkbox] + label { 27 | display:inline-block; 28 | color: black; 29 | cursor: pointer; 30 | } 31 | 32 | .history-toolbar .buttons > input[type=checkbox]:checked + label { 33 | color: blue; 34 | } 35 | 36 | .history-toolbar .buttons > a.toollink, 37 | .history-toolbar .buttons > a.toollink:link, 38 | .history-toolbar .buttons > a.toollink:visited { 39 | color: black; 40 | } 41 | 42 | .history-toolbar .buttons > a.toollink:active { 43 | color: blue; 44 | } 45 | -------------------------------------------------------------------------------- /npm/packages/history/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "declaration": true, 4 | "noImplicitAny": true, 5 | "noEmitOnError": false, 6 | "noUnusedLocals": true, 7 | "strictNullChecks": true, 8 | "module": "commonjs", 9 | "moduleResolution": "node", 10 | "target": "es6", 11 | "outDir": "./lib", 12 | "types": [], 13 | }, 14 | "include": ["src/*"] 15 | } -------------------------------------------------------------------------------- /npm/packages/labextension/.copier-answers.yml: -------------------------------------------------------------------------------- 1 | # Changes here will be overwritten by Copier; NEVER EDIT MANUALLY 2 | _commit: v4.3.5 3 | _src_path: https://github.com/jupyterlab/extension-template 4 | author_email: joaofelipenp@gmail.com 5 | author_name: Joao Felipe Pimentel 6 | data_format: json 7 | file_extension: .history+json 8 | has_binder: false 9 | kind: mimerenderer 10 | labextension_name: '@noworkflow/labextension' 11 | mimetype: application/noworkflow.history+json 12 | mimetype_name: noWorkflow History 13 | project_short_description: A JupyterLab extension for noWorkflow 14 | python_name: noworkflow_labextension 15 | repository: https://github.com/gems-uff/noworkflow 16 | test: false 17 | viewer_name: noWorkflow Viewer 18 | 19 | -------------------------------------------------------------------------------- /npm/packages/labextension/.prettierignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | **/node_modules 3 | **/lib 4 | **/package.json 5 | !/package.json 6 | noworkflow_labextension 7 | -------------------------------------------------------------------------------- /npm/packages/labextension/.yarnrc.yml: -------------------------------------------------------------------------------- 1 | nodeLinker: node-modules 2 | -------------------------------------------------------------------------------- /npm/packages/labextension/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2024 Universidade Federal Fluminense (UFF), New York University (NYU). 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /npm/packages/labextension/install.json: -------------------------------------------------------------------------------- 1 | { 2 | "packageManager": "python", 3 | "packageName": "noworkflow_labextension", 4 | "uninstallInstructions": "Use your Python package manager (pip, conda, etc.) to uninstall the package noworkflow_labextension" 5 | } 6 | -------------------------------------------------------------------------------- /npm/packages/labextension/noworkflow_labextension/__init__.py: -------------------------------------------------------------------------------- 1 | try: 2 | from ._version import __version__ 3 | except ImportError: 4 | # Fallback when using the package in dev mode without installing 5 | # in editable mode with pip. It is highly recommended to install 6 | # the package from a stable release or in editable mode: https://pip.pypa.io/en/stable/topics/local-project-installs/#editable-installs 7 | import warnings 8 | warnings.warn("Importing 'noworkflow_labextension' outside a proper installation.") 9 | __version__ = "dev" 10 | 11 | 12 | def _jupyter_labextension_paths(): 13 | return [{ 14 | "src": "labextension", 15 | "dest": "@noworkflow/labextension" 16 | }] 17 | -------------------------------------------------------------------------------- /npm/packages/labextension/setup.py: -------------------------------------------------------------------------------- 1 | __import__("setuptools").setup() 2 | -------------------------------------------------------------------------------- /npm/packages/labextension/src/index.ts: -------------------------------------------------------------------------------- 1 | import { IRenderMime } from '@jupyterlab/rendermime-interfaces'; 2 | 3 | import '../style/index.css'; 4 | import { historyFactory } from './historyrenderer'; 5 | import { trialFactory } from './trialrenderer'; 6 | import { codeFactory } from './coderenderer'; 7 | 8 | 9 | const TYPES: { 10 | [key: string]: { name: string; extensions: string[]; factory: IRenderMime.IRendererFactory }; 11 | } = { 12 | 'application/noworkflow.history+json': { 13 | name: 'noWorkflow History', 14 | extensions: ['.nowhistory'], 15 | factory: historyFactory 16 | }, 17 | 'application/noworkflow.trial+json': { 18 | name: 'noWorkflow Trial', 19 | extensions: ['.nowtrial'], 20 | factory: trialFactory 21 | }, 22 | 'application/noworkflow.code+json': { 23 | name: 'noWorkflow Code', 24 | extensions: ['.nowcode'], 25 | factory: codeFactory 26 | } 27 | }; 28 | 29 | 30 | /** 31 | * Extension definition. 32 | */ 33 | const extensions: IRenderMime.IExtension[] = Object.keys(TYPES).map(k => { 34 | const { name, factory } = TYPES[k]; 35 | return { 36 | id: `jupyterlab-noworkflow:${name}`, 37 | rendererFactory: factory, 38 | rank: 100, 39 | dataType: 'json', 40 | fileTypes: [ 41 | { 42 | name, 43 | mimeTypes: [k], 44 | extensions: TYPES[k].extensions 45 | } 46 | ], 47 | documentWidgetFactoryOptions: { 48 | name, 49 | primaryFileType: name, 50 | fileTypes: [name, 'json'], 51 | defaultFor: [name] 52 | } 53 | } as IRenderMime.IExtension; 54 | }); 55 | 56 | export default extensions; 57 | -------------------------------------------------------------------------------- /npm/packages/labextension/style/base.css: -------------------------------------------------------------------------------- 1 | /* 2 | See the JupyterLab Developer Guide for useful CSS Patterns: 3 | 4 | https://jupyterlab.readthedocs.io/en/stable/developer/css.html 5 | */ 6 | 7 | @import '~@noworkflow/utils/style/shared.css'; 8 | @import '~@noworkflow/history/style/index.css'; 9 | @import '~@noworkflow/trial/style/index.css'; 10 | -------------------------------------------------------------------------------- /npm/packages/labextension/style/index.css: -------------------------------------------------------------------------------- 1 | @import url('base.css'); 2 | -------------------------------------------------------------------------------- /npm/packages/labextension/style/index.js: -------------------------------------------------------------------------------- 1 | import './base.css'; 2 | -------------------------------------------------------------------------------- /npm/packages/labextension/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "allowSyntheticDefaultImports": true, 4 | "composite": true, 5 | "declaration": true, 6 | "esModuleInterop": true, 7 | "incremental": true, 8 | "jsx": "react", 9 | "module": "esnext", 10 | "moduleResolution": "node", 11 | "noEmitOnError": true, 12 | "noImplicitAny": true, 13 | "noUnusedLocals": true, 14 | "preserveWatchOutput": true, 15 | "resolveJsonModule": true, 16 | "outDir": "lib", 17 | "rootDir": "src", 18 | "strict": true, 19 | "strictNullChecks": true, 20 | "target": "ES2018" 21 | }, 22 | "include": ["src/*"] 23 | } 24 | -------------------------------------------------------------------------------- /npm/packages/nowvis/src/index.ts: -------------------------------------------------------------------------------- 1 | import '../style/index.css'; 2 | 3 | import {Widget} from '@lumino/widgets'; 4 | 5 | import {NowVisPanel} from './nowpanel'; 6 | import {ConfigWidget} from './config_widget'; 7 | import {ProjectWidget} from './project_widget'; 8 | import {GroupWidget} from './group_widget'; 9 | import {HistoryWidget} from './graph/history_graph'; 10 | import { AnnontationWidget } from './annotation_widget'; 11 | //import { json } from '@noworkflow/utils'; 12 | 13 | 14 | function main(): void { 15 | // ToDo: parse URL to open specific graphs 16 | var experimentsIn = (document.getElementById("experimentsIn")).value; 17 | var selectedExp = (document.getElementById("selectedExperiment")).value; 18 | var server = (document.getElementById("server")).value; 19 | var experiments=[]; 20 | 21 | if(experimentsIn) 22 | experiments=JSON.parse(experimentsIn); 23 | 24 | var mainpanel = new NowVisPanel(); 25 | mainpanel.id = 'main'; 26 | if(server=="True"){ 27 | var projectWidget = new ProjectWidget(experiments); 28 | var groupWidget = new GroupWidget(); 29 | mainpanel.addMainWidget(projectWidget); 30 | mainpanel.addMainWidget(groupWidget); 31 | } 32 | else{ 33 | var config = new ConfigWidget(); 34 | var annotationn = new AnnontationWidget(selectedExp); 35 | var history = new HistoryWidget(config, "History", "History", selectedExp,annotationn); 36 | 37 | 38 | mainpanel.addMainWidget(history); 39 | mainpanel.addMainWidget(config); 40 | mainpanel.addMainWidget(annotationn); 41 | history.load(); 42 | } 43 | 44 | Widget.attach(mainpanel, document.body); 45 | window.onresize = () => { mainpanel.update() }; 46 | } 47 | 48 | window.onload = main; -------------------------------------------------------------------------------- /npm/packages/nowvis/style/history.css: -------------------------------------------------------------------------------- 1 | @import '~@noworkflow/history/style/index.css'; 2 | 3 | .history-content, 4 | .history-content .sub-content, 5 | .history-content .sub-content > div { 6 | overflow: hidden !important; 7 | } 8 | 9 | .history-content .filter .internal { 10 | margin: 4px 8px; 11 | } 12 | 13 | .history-content .filter { 14 | } 15 | 16 | .history-content .filter input, .history-content .filter label { 17 | vertical-align: top; 18 | display: inline-block; 19 | } 20 | 21 | 22 | .history-content .graph-attr { 23 | display: inline-block; 24 | margin-right: 5px; 25 | } 26 | 27 | .history-content .graph-attr input, .history-content .graph-attr label { 28 | vertical-align: middle; 29 | display: inline-block; 30 | } 31 | 32 | .history-content .select-style { 33 | width: 170px; 34 | margin-right: 5px; 35 | } 36 | 37 | -------------------------------------------------------------------------------- /npm/packages/nowvis/style/trial.css: -------------------------------------------------------------------------------- 1 | .trial-content, 2 | .trial-content .sub-content, 3 | .trial-content .sub-content > div { 4 | overflow: hidden !important; 5 | } 6 | 7 | .trial-content .graphselector .graph-attr:first-child label { 8 | margin-right: 17px; 9 | } 10 | 11 | .trial-content .graphselector { 12 | width: 100%; 13 | padding-left: 8px; 14 | } 15 | 16 | .trial-content .graphselector .use-cache { 17 | margin-top: 10px; 18 | margin-left: 0px; 19 | } 20 | 21 | .trial-content .graphselector a.link-button { 22 | margin-top: 10px; 23 | width: 273px; 24 | } 25 | 26 | .trial-content .toggle-label { 27 | margin-right: 5px; 28 | } 29 | 30 | .graphselector > div:first-child { 31 | margin-top: 8px; 32 | } 33 | 34 | .graphselector > a:last-child { 35 | margin-bottom: 8px; 36 | } -------------------------------------------------------------------------------- /npm/packages/nowvis/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "sourceMap": true, 4 | "declaration": true, 5 | "noImplicitAny": true, 6 | "noEmitOnError": true, 7 | "noUnusedLocals": true, 8 | "strictNullChecks": true, 9 | "module": "commonjs", 10 | "moduleResolution": "node", 11 | "target": "es6", 12 | "outDir": "../../../capture/noworkflow/now/vis/static/dist/", 13 | "types": [] 14 | }, 15 | "include": ["src/*"] 16 | } -------------------------------------------------------------------------------- /npm/packages/nowvis/webpack.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | 3 | module.exports = { 4 | mode: 'development', 5 | entry: "./src/index.ts", 6 | output: { 7 | path: path.resolve(__dirname, '..', '..', '..', 'capture', 'noworkflow', 'now', 'vis', 'static', 'dist'), 8 | filename: "bundle.js" 9 | }, 10 | resolve: { 11 | // Add '.ts' and '.tsx' as a resolvable extension. 12 | extensions: [".webpack.js", ".web.js", ".ts", ".tsx", ".js"], 13 | fallback: { 14 | crypto: require.resolve("crypto-browserify"), 15 | stream: require.resolve("stream-browserify"), 16 | buffer: require.resolve("buffer/"), 17 | vm: require.resolve("vm-browserify"), 18 | fs: false, 19 | child_process: false 20 | } 21 | }, 22 | devtool: 'source-map', // if we want a source map 23 | module: { 24 | rules: [ 25 | { 26 | test: /\.ts|\.tsx$/, 27 | loader: "babel-loader" 28 | }, 29 | { 30 | test: /\.css$/, 31 | use: [ 32 | 'style-loader', 33 | 'css-loader' 34 | ] 35 | }, 36 | { 37 | test: /\.(png|jpe?g|gif)$/i, 38 | use: [ 39 | { 40 | loader: 'file-loader', 41 | }, 42 | ], 43 | }, 44 | ] 45 | } 46 | } -------------------------------------------------------------------------------- /npm/packages/trial/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@noworkflow/trial", 3 | "version": "0.0.8", 4 | "description": "noWorkflow - Trial Graph", 5 | "main": "lib/index.js", 6 | "types": "lib/index.d.ts", 7 | "files": [ 8 | "lib/*.d.ts", 9 | "lib/*.js", 10 | "style/*.css" 11 | ], 12 | "directories": { 13 | "lib": "lib/", 14 | "style": "style/" 15 | }, 16 | "dependencies": { 17 | "@noworkflow/utils": "0.0.9", 18 | "d3": "^7.9.0", 19 | "file-saver": "^2.0.5" 20 | }, 21 | "devDependencies": { 22 | "@types/d3": "7.4.3", 23 | "@types/file-saver": "^2.0.1", 24 | "rimraf": "^6.0.1", 25 | "typescript": "^5.5.4" 26 | }, 27 | "scripts": { 28 | "build": "tsc", 29 | "clean": "rimraf lib" 30 | }, 31 | "repository": { 32 | "type": "git", 33 | "url": "https://github.com/gems-uff/noworkflow.git" 34 | }, 35 | "author": "Joao Felipe Pimentel ", 36 | "license": "MIT", 37 | "bugs": { 38 | "url": "https://github.com/gems-uff/noworkflow/issues" 39 | }, 40 | "homepage": "http://gems-uff.github.io/noworkflow", 41 | "outputs": [ 42 | "lib" 43 | ] 44 | } 45 | -------------------------------------------------------------------------------- /npm/packages/trial/src/config.ts: -------------------------------------------------------------------------------- 1 | import { 2 | BaseType as d3_BaseType, 3 | Selection as d3_Selection, 4 | } from 'd3-selection'; 5 | 6 | import {TrialGraph} from './graph'; 7 | import {VisibleTrialNode} from './structures'; 8 | 9 | 10 | export 11 | interface TrialConfig { 12 | customSize: (g:TrialGraph) => number[]; 13 | customMouseOver: (g:TrialGraph, d: VisibleTrialNode) => boolean; 14 | customMouseOut: (g:TrialGraph, d: VisibleTrialNode) => boolean; 15 | customForm: (g: TrialGraph, form: d3_Selection) => void; 16 | customLoadTooltip: (g: TrialGraph, div: HTMLDivElement, text: string, trialid: string, aid: string) => void; 17 | 18 | duration: number; 19 | 20 | top: number; 21 | right: number; 22 | bottom: number; 23 | left: number; 24 | 25 | width: number; 26 | height: number; 27 | 28 | useTooltip: boolean; 29 | fontSize: number; 30 | labelFontSize: number; 31 | 32 | nodeSizeX: number; 33 | nodeSizeY: number; 34 | 35 | queryTooltip: boolean; 36 | } 37 | -------------------------------------------------------------------------------- /npm/packages/trial/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './config'; 2 | export * from './structures'; 3 | export * from './graph'; 4 | -------------------------------------------------------------------------------- /npm/packages/trial/style/index.css: -------------------------------------------------------------------------------- 1 | .trial-toolbar { 2 | margin: 5px; 3 | float: left; 4 | overflow: none; 5 | width: 375px; 6 | height: 30px; 7 | z-index: 3; 8 | position: absolute; 9 | } 10 | 11 | .trial-toolbar input { 12 | height: 30px; 13 | } 14 | 15 | .trial-toolbar input[type=checkbox] { 16 | display: none 17 | } 18 | 19 | .trial-toolbar label, .trial-toolbar a { 20 | margin-right: 8px; 21 | margin-top: 8px; 22 | } 23 | 24 | .trial-toolbar input[type=checkbox] + label { 25 | display:inline-block; 26 | color: black; 27 | cursor: pointer; 28 | } 29 | 30 | .trial-toolbar input[type=checkbox]:checked + label { 31 | color: blue; 32 | } 33 | 34 | .trial-toolbar a.toollink, 35 | .trial-toolbar a.toollink:link, 36 | .trial-toolbar a.toollink:visited { 37 | color: black; 38 | } 39 | 40 | .trial-toolbar a.toollink:active { 41 | color: blue; 42 | } 43 | -------------------------------------------------------------------------------- /npm/packages/trial/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "declaration": true, 4 | "noImplicitAny": true, 5 | "noEmitOnError": true, 6 | "noUnusedLocals": true, 7 | "strictNullChecks": true, 8 | "module": "commonjs", 9 | "moduleResolution": "node", 10 | "target": "es6", 11 | "outDir": "./lib" 12 | }, 13 | "include": ["src/*"] 14 | } -------------------------------------------------------------------------------- /npm/packages/utils/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@noworkflow/utils", 3 | "version": "0.0.9", 4 | "description": "noWorkflow - Utility functions", 5 | "main": "lib/index.js", 6 | "types": "lib/index.d.ts", 7 | "files": [ 8 | "lib/*.d.ts", 9 | "lib/*.js", 10 | "style/*.css" 11 | ], 12 | "directories": { 13 | "lib": "lib/", 14 | "style": "style/" 15 | }, 16 | "dependencies": { 17 | "d3": "^7.9.0" 18 | }, 19 | "devDependencies": { 20 | "@types/d3": "^7.4.3", 21 | "rimraf": "^6.0.1", 22 | "typescript": "^5.5.4" 23 | }, 24 | "scripts": { 25 | "build": "tsc", 26 | "clean": "rimraf lib" 27 | }, 28 | "repository": { 29 | "type": "git", 30 | "url": "https://github.com/gems-uff/noworkflow.git" 31 | }, 32 | "author": "Joao Felipe Pimentel ", 33 | "license": "MIT", 34 | "bugs": { 35 | "url": "https://github.com/gems-uff/noworkflow/issues" 36 | }, 37 | "homepage": "http://gems-uff.github.io/noworkflow", 38 | "outputs": ["lib"] 39 | } 40 | -------------------------------------------------------------------------------- /npm/packages/utils/src/d3svg.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Create diagonal line between two nodes 3 | */ 4 | export 5 | function diagonal(s: any, d: any): string { 6 | if (s.dy == undefined) { 7 | s.dy = 0; 8 | } 9 | if (d.dy == undefined) { 10 | d.dy = 0; 11 | } 12 | let path = `M ${s.x} ${(s.y + s.dy)} 13 | C ${(s.x + d.x) / 2} ${(s.y + s.dy)}, 14 | ${(s.x + d.x) / 2} ${(d.y + d.dy)}, 15 | ${d.x} ${(d.y + d.dy)}` 16 | 17 | return path; 18 | } -------------------------------------------------------------------------------- /npm/packages/utils/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './d3svg'; 2 | export * from './random'; 3 | export * from './text'; 4 | export * from './web'; 5 | -------------------------------------------------------------------------------- /npm/packages/utils/src/random.ts: -------------------------------------------------------------------------------- 1 | export 2 | function makeid(): any { 3 | var text = ""; 4 | var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; 5 | 6 | for (var i = 0; i < 5; i++) 7 | text += possible.charAt(Math.floor(Math.random() * possible.length)); 8 | 9 | return text; 10 | } -------------------------------------------------------------------------------- /npm/packages/utils/src/text.ts: -------------------------------------------------------------------------------- 1 | import { 2 | select as d3_select, 3 | } from 'd3-selection'; 4 | 5 | 6 | export 7 | function wrap(text: any, width: number) { 8 | text.each(function() { 9 | var text = d3_select(this), 10 | words = text.text().split(/(?=_)/).reverse(), 11 | word, 12 | line: string[] = [], 13 | lineNumber = 0, 14 | lineHeight = 1.1, // ems 15 | y = text.attr("y"), 16 | dy = parseFloat(text.attr("dy")), 17 | tspan = text.text(null).append("tspan").attr("x", 10).attr("y", y).attr("dy", dy + "em"); 18 | while (word = words.pop()) { 19 | line.push(word); 20 | tspan.text(line.join("")); 21 | if ((tspan.node() as any).getComputedTextLength() > width) { 22 | line.pop(); 23 | tspan.text(line.join("")); 24 | line = [word]; 25 | tspan = text.append("tspan").attr("x", 10).attr("y", y).attr("dy", ++lineNumber * lineHeight + dy + "em").text(word); 26 | } 27 | } 28 | }); 29 | } -------------------------------------------------------------------------------- /npm/packages/utils/src/web.ts: -------------------------------------------------------------------------------- 1 | import { 2 | json as d3_json, 3 | } from 'd3-fetch'; 4 | 5 | export 6 | function json(innertext:string, sub: Element, url: string, fn: (data: any) => void) { 7 | let i = document.createElement('i'); 8 | i.classList.add("loading"); 9 | i.classList.add("fa"); 10 | i.classList.add("fa-spinner"); 11 | i.classList.add("fa-pulse"); 12 | 13 | sub.innerHTML = ""; 14 | sub.appendChild(i); 15 | (sub as any).onclick = function() { 16 | json(innertext, sub, url, fn); 17 | } 18 | 19 | d3_json(url).then(function (data: any) { 20 | (sub as any).onclick = function() { 21 | 22 | } 23 | fn(data); 24 | }).catch(function(error){ 25 | i.classList.remove("fa-spinner"); 26 | i.classList.remove("fa-pulse"); 27 | i.classList.add("fa-refresh"); 28 | i.classList.add("connection-error"); 29 | 30 | let text = document.createElement('span'); 31 | text.classList.add("error-text") 32 | text.innerHTML = innertext; 33 | 34 | i.appendChild(text); 35 | }); 36 | } -------------------------------------------------------------------------------- /npm/packages/utils/style/shared.css: -------------------------------------------------------------------------------- 1 | div.now-tooltip { 2 | position: absolute; 3 | left: 1px; 4 | right: 1px; 5 | max-height: 200px; 6 | max-width: 400px; 7 | overflow: auto; 8 | padding: 5px; 9 | padding-bottom: 10px; 10 | font: 12px sans-serif; 11 | background: #DDD; 12 | border: 0px; 13 | border-radius: 8px; 14 | z-index: 2000; 15 | } 16 | 17 | .now-tooltip.hidden { 18 | display: none; 19 | } -------------------------------------------------------------------------------- /npm/packages/utils/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "declaration": true, 4 | "noImplicitAny": true, 5 | "noEmitOnError": true, 6 | "noUnusedLocals": true, 7 | "strictNullChecks": true, 8 | "module": "commonjs", 9 | "moduleResolution": "node", 10 | "target": "es6", 11 | "outDir": "./lib", 12 | "types": [] 13 | }, 14 | "include": ["src/*"] 15 | } -------------------------------------------------------------------------------- /readme_images/annotation experiment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/readme_images/annotation experiment.png -------------------------------------------------------------------------------- /readme_images/annotation_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/readme_images/annotation_add.png -------------------------------------------------------------------------------- /readme_images/annotation_success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/readme_images/annotation_success.png -------------------------------------------------------------------------------- /readme_images/collab_add_experiment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/readme_images/collab_add_experiment.png -------------------------------------------------------------------------------- /readme_images/collab_add_experiment_success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/readme_images/collab_add_experiment_success.png -------------------------------------------------------------------------------- /readme_images/collab_add_group.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/readme_images/collab_add_group.png -------------------------------------------------------------------------------- /readme_images/collab_add_group_member.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/readme_images/collab_add_group_member.png -------------------------------------------------------------------------------- /readme_images/collab_delete_group.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/readme_images/collab_delete_group.png -------------------------------------------------------------------------------- /readme_images/collab_group_success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/readme_images/collab_group_success.png -------------------------------------------------------------------------------- /readme_images/collab_group_tab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/readme_images/collab_group_tab.png -------------------------------------------------------------------------------- /readme_images/collab_main_page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/readme_images/collab_main_page.png -------------------------------------------------------------------------------- /readme_images/trial_annotations.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/readme_images/trial_annotations.png -------------------------------------------------------------------------------- /temp_transformer/todo.txt: -------------------------------------------------------------------------------- 1 | Todo: 2 | - activations for __magic__ 3 | -- setattr 4 | -- setitem 5 | - exception 6 | -- t = (1, 2, [30, 40]); t[2] += [50, 60] 7 | - unpack 8 | - from collections import ChainMap 9 | -------------------------------------------------------------------------------- /tests/call_example.py: -------------------------------------------------------------------------------- 1 | def f(x): 2 | return x 3 | 4 | def g(): 5 | return 1 6 | 7 | a = g() 8 | b = a 9 | f(a) -------------------------------------------------------------------------------- /tests/example1.py: -------------------------------------------------------------------------------- 1 | """First example""" 2 | import example2 3 | import re 4 | 5 | 6 | def a(var1): 7 | def x(): 8 | pass 9 | if var1 > 0: 10 | b() 11 | c() 12 | 13 | 14 | def b(): 15 | """function b calls c""" 16 | c() 17 | 18 | 19 | def c(): 20 | a(0) 21 | 22 | 23 | x = 10 24 | y = a(x) 25 | x = 5 26 | c() 27 | example2.e(x) 28 | print(40) 29 | b() 30 | -------------------------------------------------------------------------------- /tests/example2.py: -------------------------------------------------------------------------------- 1 | import sys 2 | 3 | 4 | def e(num): 5 | print(num) 6 | -------------------------------------------------------------------------------- /tests/fibonacci.py: -------------------------------------------------------------------------------- 1 | def fib(n): 2 | if n <= 1: 3 | return n 4 | return fib(n - 1) + fib(n - 2) 5 | -------------------------------------------------------------------------------- /tests/happy_numbers/external.py: -------------------------------------------------------------------------------- 1 | from time import sleep 2 | 3 | def process(number): 4 | sleep(10) 5 | -------------------------------------------------------------------------------- /tests/happy_numbers/happy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/tests/happy_numbers/happy.png -------------------------------------------------------------------------------- /tests/happy_numbers/happy1A.py: -------------------------------------------------------------------------------- 1 | DRY_RUN = True 2 | 3 | def process(number): 4 | while number >= 10: 5 | new_number, str_number = 0, str(number) 6 | for char in str_number: 7 | new_number += int(char) ** 2 8 | number = new_number 9 | return number 10 | 11 | def show(number): 12 | if number not in (1, 7): 13 | return "unhappy number" 14 | return "happy number" 15 | 16 | n = 10 17 | final = process(n) 18 | if DRY_RUN: 19 | final = 1 20 | print(show(final)) 21 | -------------------------------------------------------------------------------- /tests/happy_numbers/happy1B.py: -------------------------------------------------------------------------------- 1 | DRY_RUN = False 2 | 3 | def process(number): 4 | while number >= 10: 5 | new_number, str_number = 0, str(number) 6 | for char in str_number: 7 | new_number += int(char) ** 2 8 | number = new_number 9 | return number 10 | 11 | def show(number): 12 | if number not in (1, 7): 13 | return "unhappy number" 14 | return "happy number" 15 | 16 | n = 10 17 | final = process(n) 18 | if DRY_RUN: 19 | final = 1 20 | print(show(final)) 21 | -------------------------------------------------------------------------------- /tests/happy_numbers/happy2.py: -------------------------------------------------------------------------------- 1 | DRY_RUN = False 2 | 3 | def process(number): 4 | while number >= 10: 5 | new_number, str_number = 0, str(number) 6 | for char in str_number: 7 | new_number += int(char) ** 2 8 | number = new_number 9 | return number 10 | 11 | def show(number): 12 | if number not in (1, 7): 13 | return "unhappy number" 14 | return "happy number" 15 | 16 | n = 10 17 | final = process(n) 18 | if DRY_RUN: 19 | final = 1 20 | print(show(8)) 21 | -------------------------------------------------------------------------------- /tests/happy_numbers/maybe_happy_2pow4000.py: -------------------------------------------------------------------------------- 1 | DRY_RUN = True 2 | 3 | def process(number): 4 | while number >= 10: 5 | new_number, str_number = 0, str(number) 6 | for char in str_number: 7 | new_number += int(char) ** 2 8 | number = new_number 9 | return number 10 | 11 | def show(number): 12 | if number not in (1, 7): 13 | return "unhappy number" 14 | return "happy number" 15 | 16 | n = 2**4000 17 | final = process(n) 18 | if DRY_RUN: 19 | final = 1 20 | print(show(final)) 21 | -------------------------------------------------------------------------------- /tests/happy_numbers/slow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/tests/happy_numbers/slow.png -------------------------------------------------------------------------------- /tests/happy_numbers/slow.py: -------------------------------------------------------------------------------- 1 | DRY_RUN = True 2 | 3 | from external import process 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | def show(number): 12 | if number not in (1, 7): 13 | return "unhappy number" 14 | return "happy number" 15 | 16 | n = 10 17 | final = process(n) 18 | if DRY_RUN: 19 | final = 1 20 | print(show(final)) 21 | -------------------------------------------------------------------------------- /tests/t1.py: -------------------------------------------------------------------------------- 1 | def a(): 2 | def b(): 3 | print "b" 4 | print "a" 5 | 6 | print a.b() 7 | -------------------------------------------------------------------------------- /tests/t2.py: -------------------------------------------------------------------------------- 1 | import t3 2 | 3 | 4 | def run(): 5 | t3.add(8) 6 | -------------------------------------------------------------------------------- /tests/t3.py: -------------------------------------------------------------------------------- 1 | store = 0 2 | 3 | 4 | def add(x): 5 | global store 6 | store += x 7 | -------------------------------------------------------------------------------- /tests/tapp/Complex Paper Analysis/.temp.dat: -------------------------------------------------------------------------------- 1 | {"y": 4, "x": 6, "result": 40} -------------------------------------------------------------------------------- /tests/tapp/Complex Paper Analysis/experiment.py: -------------------------------------------------------------------------------- 1 | import os 2 | import json 3 | import random 4 | 5 | 6 | def main(): 7 | result = { 8 | "x": random.randint(0, 10), 9 | "y": random.randint(0, 10), 10 | } 11 | result["result"] = result["x"] ** 2 + result["y"] 12 | print(result) 13 | exp_num = os.environ["EXP_NUMBER"] 14 | 15 | for i in range(10): 16 | with open("exp{}.dat".format(i), "w") as f: 17 | if i == int(exp_num): 18 | f.write(json.dumps(result)) 19 | else: 20 | f.write("other files") 21 | 22 | if __name__ == "__main__": 23 | main() 24 | -------------------------------------------------------------------------------- /tests/tapp/Complex Paper Analysis/extractor: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python2 2 | import json 3 | import sys 4 | 5 | 6 | with open(sys.argv[1]) as f: 7 | result = json.load(f) 8 | print(' '.join(str(result[v]) for v in sys.argv[2:])) 9 | -------------------------------------------------------------------------------- /tests/tapp/Main Paper Example/.temp.dat: -------------------------------------------------------------------------------- 1 | - 1 2 | - 1 3 | -------------------------------------------------------------------------------- /tests/tapp/Main Paper Example/extractor: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python2 2 | import json 3 | import sys 4 | 5 | 6 | with open(sys.argv[1]) as f: 7 | a = [x[2:].strip() for x in f.readlines()] 8 | if sys.argv[2] == 'ALL': 9 | print(', '.join(a)) 10 | elif sys.argv[2].isdigit: 11 | print(a[int(sys.argv[2]) - 1]) 12 | -------------------------------------------------------------------------------- /tests/tapp/Main Paper Example/script1.py: -------------------------------------------------------------------------------- 1 | # script1.py 2 | from script2 import y, z 3 | 4 | 5 | def x(i): 6 | if i % 2: 7 | z(i) 8 | return y(i) 9 | return z(i) 10 | 11 | if __name__ == "__main__": 12 | for i in range(3): 13 | x(i) 14 | z(i) 15 | -------------------------------------------------------------------------------- /tests/tapp/Main Paper Example/script2.py: -------------------------------------------------------------------------------- 1 | # script2.py 2 | from random import random 3 | from time import sleep 4 | 5 | 6 | def y(i): 7 | sleep(.01) 8 | with open("y.txt", "a") as f: 9 | f.write("- {}\n".format(i)) 10 | 11 | 12 | def z(i): 13 | sleep(.1) 14 | with open("z.txt", "w") as f: 15 | f.write("- {}\n".format(i)) 16 | 17 | __version__ = "1.0.2" 18 | -------------------------------------------------------------------------------- /tests/tapp/Main Paper Example/y.txt: -------------------------------------------------------------------------------- 1 | - 1 2 | - 1 3 | - 1 4 | - 1 5 | -------------------------------------------------------------------------------- /tests/tapp/Main Paper Example/z.txt: -------------------------------------------------------------------------------- 1 | - 2 2 | -------------------------------------------------------------------------------- /tests/tapp/Presentation/experiment.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import matplotlib.pyplot as plt 3 | from precipitation import read, prepare 4 | 5 | 6 | def bar_graph(years): 7 | global PREC, MONTHS 8 | prepare(PREC, MONTHS, years, plt) 9 | plt.savefig("out.png") 10 | 11 | MONTHS = np.arange(12) + 1 12 | d13, d14 = read("p13.dat"), read("p14.dat") 13 | PREC = prec13, prec14 = [], [] 14 | 15 | for i in MONTHS: 16 | prec13.append(sum(d13[i])) 17 | prec14.append(sum(d14[i])) 18 | 19 | bar_graph(["2013", "2014"]) 20 | -------------------------------------------------------------------------------- /tests/tapp/Presentation/experiment2.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import matplotlib.pyplot as plt 3 | from precipitation import read, prepare 4 | 5 | 6 | def bar_graph(years): 7 | global PREC, MONTHS 8 | prepare(PREC, MONTHS, years, plt) 9 | plt.savefig("out.png") 10 | 11 | MONTHS = np.arange(12) + 1 12 | d12 = read("p12.dat") 13 | d13, d14 = read("p13.dat"), read("p14.dat") 14 | PREC = prec12, prec13, prec14 = [], [], [] 15 | 16 | for i in MONTHS: 17 | prec12.append(sum(d12[i])) 18 | prec13.append(sum(d13[i])) 19 | prec14.append(sum(d14[i])) 20 | 21 | bar_graph(["2012", "2013", "2014"]) 22 | -------------------------------------------------------------------------------- /tests/tapp/Presentation/out.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/tests/tapp/Presentation/out.png -------------------------------------------------------------------------------- /tests/tapp/Presentation/precipitation.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python2 2 | 3 | import csv 4 | from collections import defaultdict 5 | 6 | 7 | def read(filename): 8 | result = defaultdict(list) 9 | with open(filename, "r") as c: 10 | reader = csv.reader(c, delimiter=";") 11 | for row in reader: 12 | month = int(row[1].split("/")[1]) 13 | precipitation = float(row[3]) 14 | result[month].append(precipitation) 15 | return result 16 | 17 | 18 | def prepare(series, months, names, plt, div=.1, colors=["b", "g", "r"]): 19 | fig, ax = plt.subplots() 20 | 21 | ax.set_ylabel("Precipitation (mm)") 22 | ax.set_xlabel("Month") 23 | ax.set_title("Precipitation by Month") 24 | ax.set_xticks(months + .5) 25 | ax.set_xticklabels(list(map(str, months))) 26 | 27 | half_div = div / 2.0 28 | width = (1.0 - div) / len(series) 29 | bars = [] 30 | for i, data in enumerate(series): 31 | bars.append(ax.bar(months + half_div + i * width, data, width, 32 | color=colors[i])) 33 | 34 | ax.legend(bars, names) 35 | 36 | __VERSION__ = "1.0.1" 37 | 38 | if __name__ == "__main__": 39 | import sys 40 | filename = sys.argv[1] 41 | month = sys.argv[2] 42 | data = read(filename) 43 | print(";".join(map(str, data[int(month)]))) 44 | -------------------------------------------------------------------------------- /tests/test_async_py35.py: -------------------------------------------------------------------------------- 1 | import asyncio 2 | 3 | 4 | def func(obj): 5 | return obj 6 | 7 | 8 | def dec(obj): 9 | return obj 10 | 11 | 12 | @dec 13 | async def function(param): 14 | print('function {} 1'.format(param)) 15 | await asyncio.sleep(0.01) 16 | print('function {} 2'.format(param)) 17 | 18 | 19 | class AsyncFeatures(object): 20 | 21 | def __init__(self): 22 | self.i = 0 23 | 24 | async def __aenter__(self): 25 | await function("enter") 26 | 27 | async def __aexit__(self, exc_type, exc, traceback): 28 | await function("exit") 29 | 30 | async def __aiter__(self): 31 | self.i = 0 32 | return self 33 | 34 | async def __anext__(self): 35 | self.i += 1 36 | if self.i > 3: 37 | raise StopAsyncIteration 38 | await function("next {}".format(self.i)) 39 | return self.i 40 | 41 | @dec 42 | async def method(self): 43 | async with self: 44 | await function("method A") 45 | await function("method B") 46 | await function("method C") 47 | async for i in self: 48 | await function("for {}".format(i)) 49 | 50 | async def other(): 51 | obj = AsyncFeatures() 52 | await obj.method() 53 | 54 | loop = asyncio.get_event_loop() 55 | loop.run_until_complete(other()) 56 | -------------------------------------------------------------------------------- /tests/test_cfunc.py: -------------------------------------------------------------------------------- 1 | a, b, c, d = 1, 2, 3, 4 2 | c = min(a, b, min(c, d)) 3 | print(c) 4 | -------------------------------------------------------------------------------- /tests/test_decorator.py: -------------------------------------------------------------------------------- 1 | def func(arg): 2 | return arg 3 | 4 | def dec(obj): 5 | return obj 6 | 7 | @dec 8 | def function(): 9 | func(1) 10 | func(2) 11 | 12 | @dec 13 | class Class(object): 14 | 15 | @dec 16 | def method(self): 17 | func(3) 18 | func(4) 19 | -------------------------------------------------------------------------------- /tests/test_disasm.py: -------------------------------------------------------------------------------- 1 | def f(x=2): 2 | return x 3 | 4 | 5 | lis = [1] 6 | dic = { 7 | "x": 2 8 | } 9 | 10 | f(1) # call_function 11 | f(*lis) # call_function_var 12 | f(**dic) # call_function_kw 13 | f(*[], **dic) # call_function_var_kw 14 | 15 | 16 | class C(object): # call_function 17 | 18 | def __enter__(self): 19 | x = 1 20 | return x 21 | 22 | def __exit__(self, *args, **kwargs): 23 | pass 24 | 25 | 26 | def fn_dec(*args): 27 | def dec(fn): 28 | return fn 29 | return dec 30 | 31 | dec1 = fn_dec("1") 32 | 33 | 34 | @fn_dec("2") # call_function 35 | @dec1 # call_function 36 | def fw(x): 37 | return x 38 | 39 | 40 | @fn_dec("2") # call_function 41 | @dec1 # call_function 42 | class D(object): 43 | pass 44 | 45 | [a for a in lis] # nothing 46 | {a for a in lis} # call_function 47 | {a: a for a in lis} # call_function 48 | f(a for a in lis) # call_function gen, call_function 49 | 50 | with C() as r: # WITH_CLEANUP 51 | pass 52 | 53 | assert True # nothing 54 | assert True, "wat" # call_function 55 | -------------------------------------------------------------------------------- /tests/test_exception.py: -------------------------------------------------------------------------------- 1 | def y(): 2 | raise TypeError 3 | 4 | 5 | def x(): 6 | y() 7 | 8 | 9 | try: 10 | x() 11 | except TypeError: 12 | print("x") 13 | -------------------------------------------------------------------------------- /tests/test_func.py: -------------------------------------------------------------------------------- 1 | def h(a): 2 | return a 3 | 4 | 5 | def f(a): 6 | return h 7 | 8 | 9 | g = f 10 | 11 | a = 1 12 | b = 2 13 | c = g(3)(2) 14 | d = (f(a) if a else g(a))(a) 15 | d = [ 16 | h(a) + h(b), 17 | h(a), h(c) 18 | ] 19 | print(d) 20 | -------------------------------------------------------------------------------- /tests/test_loop_1.py: -------------------------------------------------------------------------------- 1 | def y(): 2 | pass 3 | 4 | 5 | def x(): 6 | y() 7 | 8 | 9 | x() 10 | x() 11 | -------------------------------------------------------------------------------- /tests/test_loop_2.py: -------------------------------------------------------------------------------- 1 | def y(): 2 | pass 3 | 4 | 5 | def x(): 6 | for i in range(10): 7 | y() 8 | 9 | 10 | x() 11 | -------------------------------------------------------------------------------- /tests/test_loop_3.py: -------------------------------------------------------------------------------- 1 | def y(): 2 | pass 3 | 4 | 5 | def x(): 6 | y() 7 | 8 | 9 | for i in range(10): 10 | x() 11 | -------------------------------------------------------------------------------- /tests/test_loop_4.py: -------------------------------------------------------------------------------- 1 | def y(): 2 | pass 3 | 4 | 5 | def x(): 6 | for i in range(10): 7 | y() 8 | 9 | 10 | for i in range(10): 11 | x() 12 | x() 13 | -------------------------------------------------------------------------------- /tests/test_loop_5.py: -------------------------------------------------------------------------------- 1 | def y(): 2 | pass 3 | 4 | 5 | def z(): 6 | pass 7 | 8 | 9 | def x(i): 10 | if i % 2: 11 | return y() 12 | return z() 13 | 14 | 15 | for i in range(10): 16 | x(i) 17 | -------------------------------------------------------------------------------- /tests/test_metaclass_py3.py: -------------------------------------------------------------------------------- 1 | class MyMeta(type): 2 | def __new__(meta, name, bases, dct): 3 | print("Allocating memory for class", name) 4 | return super(MyMeta, meta).__new__(meta, name, bases, dct) 5 | def __init__(cls, name, bases, dct): 6 | print("Initializing class", name) 7 | super(MyMeta, cls).__init__(name, bases, dct) 8 | 9 | 10 | def dec(arg): 11 | return arg 12 | 13 | class X(metaclass=MyMeta): 14 | 15 | @dec 16 | def f(arg): 17 | pass 18 | 19 | 20 | x = X() 21 | -------------------------------------------------------------------------------- /tests/test_noreturn_func.py: -------------------------------------------------------------------------------- 1 | def fn(a, b): 2 | d = 1 3 | c = d 4 | 5 | x, y = 2, 3 6 | r = fn(x, y) 7 | -------------------------------------------------------------------------------- /tests/test_slow.py: -------------------------------------------------------------------------------- 1 | def y(x): 2 | e = x 3 | return e 4 | 5 | 6 | def x(t): 7 | d = 0 8 | for i in range(t): 9 | d += y(i) 10 | return d 11 | 12 | 13 | a = 100 14 | b = a 15 | 16 | for i in range(a): 17 | c = x(b) 18 | d = x(b) 19 | -------------------------------------------------------------------------------- /tests/test_var.py: -------------------------------------------------------------------------------- 1 | def x(a=1): 2 | return a 3 | 4 | for j in range(3): 5 | for i in range(j): 6 | print(i) 7 | i = i ** 2 8 | i += 2 9 | 10 | 11 | class A(): 12 | pass 13 | 14 | 15 | a = x(a=2) 16 | a = b = c = 1 17 | a = list(range(5)) 18 | A.a = c 19 | a[b] = b 20 | e = b, c = c, 1 21 | a, (b, c) = b, e 22 | a += (lambda b: b)(a) 23 | b = a 24 | a = 2 25 | c = { 26 | "a": a, 27 | "b": b 28 | } 29 | d = [a, b, c] 30 | d[1] += 1 31 | 32 | 33 | print(a) 34 | print(b) 35 | print(c) 36 | 37 | a, b = 1, c 38 | -------------------------------------------------------------------------------- /tests/test_var_loop.py: -------------------------------------------------------------------------------- 1 | lista = range(2) 2 | 3 | for i in lista: 4 | a = 5 5 | i += a 6 | print(i) -------------------------------------------------------------------------------- /tests/test_with.py: -------------------------------------------------------------------------------- 1 | class ContextManager: 2 | 3 | def __enter__(self): 4 | return 2 5 | 6 | def __exit__(self, *args, **kwargs): 7 | pass 8 | 9 | 10 | def func(): 11 | context = ContextManager() 12 | 13 | with context as value: 14 | for i in range(value): 15 | print(i) 16 | 17 | 18 | func() -------------------------------------------------------------------------------- /tests/test_yield.py: -------------------------------------------------------------------------------- 1 | def new_range(maximum): 2 | j = 0 3 | while j < maximum: 4 | yield j 5 | j += 1 6 | 7 | for k in new_range(3): 8 | print(k) 9 | print(k) 10 | -------------------------------------------------------------------------------- /tests/weather/simulation.py: -------------------------------------------------------------------------------- 1 | import csv 2 | import sys 3 | import matplotlib.pyplot as plt 4 | from simulator import simulate 5 | 6 | 7 | def run_simulation(data_a, data_b): 8 | a = csv_read(data_a) 9 | b = csv_read(data_b) 10 | data = simulate(a, b) 11 | return data 12 | 13 | 14 | def csv_read(f): 15 | reader = csv.reader(open(f, "rU"), delimiter=":") 16 | data = [] 17 | for row in reader: 18 | data.append(row) 19 | return data 20 | 21 | 22 | def extract_column(data, column): 23 | col_data = [] 24 | for row in data: 25 | col_data.append(float(row[column])) 26 | return col_data 27 | 28 | 29 | def plot(data): 30 | # GetTemperature 31 | t = extract_column(data, 0) 32 | # GetPrecipitation 33 | p = extract_column(data, 1) 34 | plt.scatter(t, p, marker="o") 35 | plt.xlabel("Temperature") 36 | plt.ylabel("Precipitation") 37 | plt.savefig("output.png") 38 | 39 | 40 | # Main Program 41 | data_a = sys.argv[1] 42 | data_b = sys.argv[2] 43 | data = run_simulation(data_a, data_b) 44 | plot(data) 45 | -------------------------------------------------------------------------------- /tests/weather/simulation_dummy.py: -------------------------------------------------------------------------------- 1 | import sys 2 | 3 | def run_simulation(data_a, data_b): 4 | return data_a + data_b 5 | 6 | def plot(data): 7 | pass 8 | 9 | # Main Program 10 | data_a = sys.argv[1] 11 | data_b = sys.argv[2] 12 | data = run_simulation(data_a, data_b) 13 | plot(data) -------------------------------------------------------------------------------- /tests/weather/simulator.py: -------------------------------------------------------------------------------- 1 | import time 2 | 3 | 4 | def simulate(a, b): 5 | time.sleep(2) 6 | data = a + b 7 | return data 8 | -------------------------------------------------------------------------------- /wiki_images/begin1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/wiki_images/begin1.png -------------------------------------------------------------------------------- /wiki_images/begin2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/wiki_images/begin2.png -------------------------------------------------------------------------------- /wiki_images/begin3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/wiki_images/begin3.png -------------------------------------------------------------------------------- /wiki_images/exportdataflow1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/wiki_images/exportdataflow1.png -------------------------------------------------------------------------------- /wiki_images/exportdataflow2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/wiki_images/exportdataflow2.png -------------------------------------------------------------------------------- /wiki_images/exportdataflow3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/wiki_images/exportdataflow3.png -------------------------------------------------------------------------------- /wiki_images/exportprolog1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/wiki_images/exportprolog1.png -------------------------------------------------------------------------------- /wiki_images/exportprolog2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/wiki_images/exportprolog2.png -------------------------------------------------------------------------------- /wiki_images/exportprolog3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/wiki_images/exportprolog3.png -------------------------------------------------------------------------------- /wiki_images/exportprolog4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/wiki_images/exportprolog4.png -------------------------------------------------------------------------------- /wiki_images/exportprov1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/wiki_images/exportprov1.png -------------------------------------------------------------------------------- /wiki_images/exportprov2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/wiki_images/exportprov2.png -------------------------------------------------------------------------------- /wiki_images/wikipageimage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gems-uff/noworkflow/ce983f19051befe765bd4e7eef71bf05229b707f/wiki_images/wikipageimage.png --------------------------------------------------------------------------------