scipion-pyworkflow 3.4.0__tar.gz → 3.6.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {scipion-pyworkflow-3.4.0/scipion_pyworkflow.egg-info → scipion_pyworkflow-3.6.0}/PKG-INFO +1 -1
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/apps/pw_project.py +3 -8
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/config.py +197 -116
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/constants.py +4 -2
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/gui/browser.py +15 -17
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/gui/canvas.py +3 -3
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/gui/dialog.py +59 -61
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/gui/form.py +1 -1
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/gui/graph_layout.py +29 -37
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/gui/gui.py +56 -33
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/gui/project/base.py +5 -2
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/gui/project/labels.py +4 -2
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/gui/project/project.py +7 -26
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/gui/project/searchrun.py +19 -12
- scipion_pyworkflow-3.6.0/pyworkflow/gui/project/variables.py +179 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/gui/project/viewdata.py +1 -34
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/gui/project/viewprojects.py +3 -5
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/gui/project/viewprotocols.py +34 -104
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/gui/project/viewprotocols_extra.py +2 -3
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/gui/tree.py +2 -2
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/gui/widgets.py +1 -1
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/mapper/mapper.py +1 -2
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/mapper/sqlite.py +48 -13
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/object.py +40 -14
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/plugin.py +23 -14
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/project/__init__.py +1 -1
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/project/config.py +0 -15
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/project/project.py +18 -6
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/protocol/executor.py +12 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/protocol/launch.py +32 -25
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/protocol/protocol.py +39 -6
- scipion_pyworkflow-3.6.0/pyworkflow/resources/sprites.png +0 -0
- scipion_pyworkflow-3.6.0/pyworkflow/resources/sprites.xcf +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/template.py +9 -17
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/utils/log.py +2 -2
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/utils/path.py +54 -2
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/utils/progressbar.py +14 -3
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/utils/properties.py +165 -99
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/utils/utils.py +25 -1
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/viewer.py +7 -1
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflowtests/tests/test_mappers.py +22 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflowtests/tests/test_object.py +12 -1
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflowtests/tests/test_utils.py +74 -4
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0/scipion_pyworkflow.egg-info}/PKG-INFO +1 -1
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/scipion_pyworkflow.egg-info/SOURCES.txt +3 -86
- scipion-pyworkflow-3.4.0/pyworkflow/resources/backward-solid.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/beta.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/binoculares.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/bookmark.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/broom-solid.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/class_obj.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/clipboard-regular.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/code-branch-solid.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/debug.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/fa-arrow-down.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/fa-arrow-left.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/fa-arrow-up.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/fa-ban.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/fa-bars.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/fa-check.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/fa-checked.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/fa-cog.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/fa-cogs.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/fa-database.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/fa-delete-operation.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/fa-download.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/fa-external-link.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/fa-eye.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/fa-failure.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/fa-file-o.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/fa-files-o.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/fa-folder-open.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/fa-home.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/fa-install.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/fa-installed.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/fa-lightbulb-o.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/fa-list-ul.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/fa-magic.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/fa-minus-square.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/fa-next.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/fa-pencil.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/fa-play-circle-o.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/fa-plus-square.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/fa-previous.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/fa-processing.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/fa-question-circle.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/fa-refresh.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/fa-rocket.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/fa-save.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/fa-sign-in.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/fa-sign-out.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/fa-sitemap.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/fa-stop-workflow.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/fa-stop.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/fa-tags.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/fa-times.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/fa-to_install.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/fa-trash-o.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/fa-unchecked.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/fa-undo.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/fa-uninstall.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/fa-update.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/fa-upload.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/file.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/file_folder.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/file_folder_link.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/file_generic.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/file_generic_link.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/file_image.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/file_image_link.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/file_java.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/file_log.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/file_md.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/file_md_link.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/file_python.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/file_sqlite.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/file_stack.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/file_stack_link.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/file_text.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/new.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/no-image.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/paste-solid.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/power-off-solid.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/production.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/prot_disabled.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/question.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/rename.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/root.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/updated.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/users.png +0 -0
- scipion-pyworkflow-3.4.0/pyworkflow/resources/workflow.png +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/LICENSE.txt +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/MANIFEST.in +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/README.rst +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/__init__.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/apps/__init__.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/apps/pw_manager.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/apps/pw_plot.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/apps/pw_protocol_list.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/apps/pw_protocol_run.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/apps/pw_run_tests.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/apps/pw_schedule_run.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/apps/pw_sleep.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/apps/pw_sync_data.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/apps/pw_viewer.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/exceptions.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/gui/__init__.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/gui/graph.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/gui/matplotlib_image.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/gui/plotter.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/gui/project/__init__.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/gui/project/constants.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/gui/project/searchprotocol.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/gui/project/steps.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/gui/project/utils.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/gui/text.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/gui/tooltip.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/mapper/__init__.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/mapper/sqlite_db.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/mapper/xmlmapper.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/project/manager.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/project/scripts/clean_projects.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/project/scripts/config.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/project/scripts/create.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/project/scripts/edit_workflow.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/project/scripts/fix_links.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/project/scripts/load.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/project/scripts/refresh.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/project/scripts/schedule.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/project/scripts/stack2volume.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/project/scripts/stop.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/protocol/__init__.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/protocol/bibtex.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/protocol/constants.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/protocol/hosts.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/protocol/package.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/protocol/params.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/Imagej.png +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/chimera.png +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/fa-exclamation-triangle_alert.png +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/fa-info-circle_alert.png +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/fa-search.png +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/fa-times-circle_alert.png +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/file_vol.png +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/loading.gif +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/no-image128.png +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/scipion_bn.png +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/scipion_icon.png +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/scipion_icon.svg +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/scipion_icon_proj.png +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/scipion_icon_projs.png +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/scipion_icon_prot.png +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/scipion_logo.png +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/scipion_logo_normal.png +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/scipion_logo_small.png +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/showj/arrowDown.png +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/showj/arrowUp.png +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/showj/background_section.png +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/showj/colRowModeOff.png +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/showj/colRowModeOn.png +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/showj/delete.png +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/showj/doc_icon.png +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/showj/download_icon.png +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/showj/enabled_gallery.png +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/showj/galleryViewOff.png +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/showj/galleryViewOn.png +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/showj/goto.png +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/showj/menu.png +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/showj/separator.png +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/showj/tableViewOff.png +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/showj/tableViewOn.png +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/showj/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/showj/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/showj/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/showj/volumeOff.png +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/showj/volumeOn.png +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/wait.gif +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/tests/__init__.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/tests/test_utils.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/tests/tests.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/utils/__init__.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/utils/dataset.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/utils/echo.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/utils/graph.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/utils/process.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/utils/profiler.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/utils/reflection.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/utils/which.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/webservices/__init__.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/webservices/config.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/webservices/notifier.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/webservices/repository.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflow/wizard.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflowtests/__init__.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflowtests/bibtex.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflowtests/objects.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflowtests/protocols.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflowtests/tests/__init__.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflowtests/tests/test_canvas.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflowtests/tests/test_domain.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflowtests/tests/test_logs.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflowtests/tests/test_project.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflowtests/tests/test_protocol_execution.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflowtests/tests/test_protocol_export.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflowtests/tests/test_protocol_output.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/pyworkflowtests/tests/test_streaming.py +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/requirements.txt +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/scipion_pyworkflow.egg-info/dependency_links.txt +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/scipion_pyworkflow.egg-info/entry_points.txt +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/scipion_pyworkflow.egg-info/requires.txt +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/scipion_pyworkflow.egg-info/top_level.txt +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/setup.cfg +0 -0
- {scipion-pyworkflow-3.4.0 → scipion_pyworkflow-3.6.0}/setup.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: scipion-pyworkflow
|
3
|
-
Version: 3.
|
3
|
+
Version: 3.6.0
|
4
4
|
Summary: Simple workflow platform used in scientific applications, initially developed within the Scipion framework for image processing in Electron Microscopy.
|
5
5
|
Home-page: https://github.com/scipion-em/scipion-pyworkflow
|
6
6
|
Author: J.M. De la Rosa Trevin, Roberto Marabini, Grigory Sharov, Josue Gomez Blanco, Pablo Conesa, Yunior Fonseca Reyna
|
@@ -36,19 +36,14 @@ from pyworkflow.project import Manager
|
|
36
36
|
from pyworkflow.gui.project import ProjectWindow
|
37
37
|
import pyworkflow.utils as pwutils
|
38
38
|
|
39
|
-
import logging
|
40
|
-
|
41
39
|
HERE = 'here'
|
42
|
-
|
43
40
|
LAST = 'last'
|
44
|
-
|
45
41
|
LIST = 'list'
|
46
|
-
logger = logging.getLogger(__name__)
|
47
42
|
|
48
43
|
def openProject(projectName):
|
49
44
|
""" Opens a scipion project:
|
50
45
|
|
51
|
-
:param projectName: Name of
|
46
|
+
:param projectName: Name of an existing project to open,
|
52
47
|
or "here" to create a project in the current working dir,
|
53
48
|
or "last" to open the most recent project
|
54
49
|
|
@@ -97,7 +92,7 @@ def openProject(projectName):
|
|
97
92
|
projWindow = ProjectWindow(projPath)
|
98
93
|
projWindow.show()
|
99
94
|
else:
|
100
|
-
|
95
|
+
print("Can't open project %s. It does not exist" % projPath)
|
101
96
|
|
102
97
|
#Show the list of projects
|
103
98
|
showProjectList(manager)
|
@@ -115,4 +110,4 @@ if __name__ == '__main__':
|
|
115
110
|
if len(sys.argv) > 1:
|
116
111
|
openProject(sys.argv[1])
|
117
112
|
else:
|
118
|
-
|
113
|
+
print("usage: pw_project.py PROJECT_NAME or %s or %s or %s" % (HERE, LAST, LIST))
|
@@ -1,10 +1,9 @@
|
|
1
|
-
|
2
1
|
import logging
|
2
|
+
|
3
3
|
logger = logging.getLogger(__file__)
|
4
4
|
import ast
|
5
5
|
import importlib
|
6
6
|
import inspect
|
7
|
-
import json
|
8
7
|
import os
|
9
8
|
import shutil
|
10
9
|
import sys
|
@@ -20,12 +19,15 @@ def join(*paths):
|
|
20
19
|
return os.path.join(HOME, *paths)
|
21
20
|
|
22
21
|
|
23
|
-
__resourcesPath =
|
22
|
+
__resourcesPath = join('resources')
|
24
23
|
|
24
|
+
def getResourcesPath(file=None):
|
25
|
+
|
26
|
+
return __resourcesPath if file is None else os.path.join(__resourcesPath, file)
|
25
27
|
|
26
28
|
def findResource(filename):
|
27
29
|
from .utils.path import findFile
|
28
|
-
return findFile(filename, *__resourcesPath)
|
30
|
+
return findFile(filename, *[__resourcesPath])
|
29
31
|
|
30
32
|
|
31
33
|
def genNotesHeading():
|
@@ -63,23 +65,106 @@ def getModuleFolder(moduleName):
|
|
63
65
|
return os.path.dirname(spec.origin)
|
64
66
|
|
65
67
|
|
68
|
+
def validColor(colorname):
|
69
|
+
""" If it can be converted to rgb is a valid color"""
|
70
|
+
from matplotlib.colors import to_rgb
|
71
|
+
to_rgb(colorname)
|
72
|
+
return colorname
|
73
|
+
|
74
|
+
class VarTypes(Enum):
|
75
|
+
STRING = 0
|
76
|
+
BOOLEAN = 1
|
77
|
+
PATH = 2 # Any Path: Folder or file
|
78
|
+
INTEGER = 3
|
79
|
+
DECIMAL = 4
|
80
|
+
FILENAME = 5 # Just the base name of a file
|
81
|
+
FOLDER = 6 # A folder
|
82
|
+
|
83
|
+
class Variable:
|
84
|
+
def __init__(self, name, description, source, value, default, var_type: VarTypes = VarTypes.STRING, isDefault=None):
|
85
|
+
self.name = name
|
86
|
+
self.description = description
|
87
|
+
self.source = source
|
88
|
+
self.value = value
|
89
|
+
self.default = default
|
90
|
+
self.var_type = var_type
|
91
|
+
self.isDefault = isDefault if isDefault is not None else value==default
|
92
|
+
def setToDefault(self):
|
93
|
+
self.isDefault=True
|
94
|
+
self.value=self.default
|
95
|
+
|
96
|
+
class VariablesRegistry:
|
97
|
+
_variables={}
|
98
|
+
|
99
|
+
def __init__(self):
|
100
|
+
raise RuntimeError("Variables class doesn't need to be instantiated.")
|
101
|
+
@classmethod
|
102
|
+
def register(cls, variable: Variable):
|
103
|
+
cls._variables[variable.name] = variable
|
104
|
+
|
105
|
+
@classmethod
|
106
|
+
def variables(cls):
|
107
|
+
return cls._variables
|
108
|
+
|
109
|
+
@classmethod
|
110
|
+
def __iter__(cls):
|
111
|
+
""" Iterate alphabetically"""
|
112
|
+
for key in sorted(cls._variables):
|
113
|
+
yield cls._variables[key]
|
114
|
+
|
115
|
+
@classmethod
|
116
|
+
def save(cls, path):
|
117
|
+
""" Saves the variables in the path specified """
|
118
|
+
from pyworkflow.utils import backup
|
119
|
+
backup(path)
|
120
|
+
|
121
|
+
with open(path,"w") as fh:
|
122
|
+
# Save the section as in any python config file format.
|
123
|
+
fh.write("[PYWORKFLOW]\n")
|
124
|
+
for var in cls.__iter__():
|
125
|
+
if var.source == "pyworkflow" and not var.isDefault:
|
126
|
+
fh.write("%s=%s\n" % (var.name, var.value))
|
127
|
+
|
128
|
+
fh.write("\n[PLUGINS]\n")
|
129
|
+
for var in cls._variables.values():
|
130
|
+
if var.source != "pyworkflow" and not var.isDefault:
|
131
|
+
fh.write("%s=%s\n" % (var.name, var.value))
|
132
|
+
|
133
|
+
|
66
134
|
class Config:
|
67
135
|
""" Main Config for pyworkflow. It contains the main Scipion configuration variables
|
68
136
|
providing default values or, if present, taking them from the environment.
|
69
137
|
Necessary value is SCIPION_HOME and has to be present in the environment"""
|
70
138
|
|
71
139
|
@staticmethod
|
72
|
-
def __get(key, default):
|
73
|
-
value = os.environ.get(key, default)
|
140
|
+
def __get(key, default, description=None, caster=None, var_type:VarTypes=VarTypes.STRING, source="pyworkflow"):
|
74
141
|
|
142
|
+
if key in os.environ:
|
143
|
+
value = os.environ.get(key)
|
144
|
+
isDefault = (value==default)
|
145
|
+
else:
|
146
|
+
isDefault = True
|
147
|
+
value = default
|
148
|
+
|
149
|
+
# If the caster is passed do the casting, if fails go back to default
|
150
|
+
if caster:
|
151
|
+
try:
|
152
|
+
value=caster(value)
|
153
|
+
except:
|
154
|
+
logger.warning("Variable %s has this value %s that can't be casted to the right type (%s). Using %s (default value)" %
|
155
|
+
(key,value, caster, default))
|
156
|
+
value = default
|
75
157
|
# If empty use default value
|
76
158
|
if value == "" != default:
|
77
159
|
logger.warning("%s variable is empty, falling back to default value (%s)" % (key, default))
|
78
160
|
value = default
|
161
|
+
|
79
162
|
# Expand user and variables if string value
|
80
163
|
if isinstance(value, str):
|
81
164
|
value = os.path.expandvars(os.path.expanduser(value))
|
82
165
|
|
166
|
+
# Register the variable
|
167
|
+
VariablesRegistry.register(Variable(key,description, source, value, default, var_type=var_type, isDefault=isDefault))
|
83
168
|
return value
|
84
169
|
|
85
170
|
class Root:
|
@@ -97,139 +182,145 @@ class Config:
|
|
97
182
|
|
98
183
|
# Home for scipion
|
99
184
|
_get = __get.__func__
|
100
|
-
SCIPION_HOME = os.path.abspath(_get(SCIPION_HOME_VAR, ''
|
101
|
-
"Path where Scipion is installed. Other paths are based on this like SCIPION_SOFTWARE, SCIPION_TESTS,... unless specified"
|
185
|
+
SCIPION_HOME = os.path.abspath(_get(SCIPION_HOME_VAR, '',
|
186
|
+
"Path where Scipion is installed. Other paths are based on this like SCIPION_SOFTWARE, SCIPION_TESTS,... unless specified"))
|
102
187
|
|
103
|
-
#
|
104
|
-
SCIPION_HOME_DEFINED =
|
105
|
-
"False if SCIPION_HOME is not found in the environment"
|
188
|
+
# False if SCIPION_HOME is not found in the environment. To distinguish API documentation generation execution.
|
189
|
+
SCIPION_HOME_DEFINED = SCIPION_HOME != ''
|
106
190
|
|
107
|
-
_root = Root(SCIPION_HOME)
|
191
|
+
_root = Root(str(SCIPION_HOME))
|
108
192
|
_join = _root.join
|
109
193
|
|
110
194
|
# Internal cached variables, use __ so they are not returned in getVars
|
111
195
|
__activeColor = None
|
112
196
|
|
113
|
-
CONDA_ACTIVATION_CMD = _get(CONDA_ACTIVATION_CMD_VAR,''
|
114
|
-
"str: Command to activate/initialize conda itself. Do not confuse it with 'conda activate'. It should be defined at installation time. It looks like this: eval \"$(/extra/miniconda3/bin/conda shell.bash hook)\""
|
197
|
+
CONDA_ACTIVATION_CMD = _get(CONDA_ACTIVATION_CMD_VAR,'',
|
198
|
+
"str: Command to activate/initialize conda itself. Do not confuse it with 'conda activate'. It should be defined at installation time. It looks like this: eval \"$(/extra/miniconda3/bin/conda shell.bash hook)\"")
|
115
199
|
|
116
200
|
# SCIPION PATHS
|
117
|
-
SCIPION_SOFTWARE =
|
118
|
-
"Path where Scipion will install the software. Defaults to SCIPION_HOME/software."
|
201
|
+
SCIPION_SOFTWARE = _get('SCIPION_SOFTWARE', _join('software'),
|
202
|
+
"Path where Scipion will install the software. Defaults to SCIPION_HOME/software.", var_type=VarTypes.FOLDER)
|
119
203
|
|
120
|
-
SCIPION_TESTS =
|
121
|
-
"Path where to find/download test data. Defaults to SCIPION_HOME/data/tests."
|
204
|
+
SCIPION_TESTS = _get('SCIPION_TESTS', _join('data', 'tests'),
|
205
|
+
"Path where to find/download test data. Defaults to SCIPION_HOME/data/tests.", var_type=VarTypes.FOLDER)
|
122
206
|
|
123
207
|
# User dependent paths
|
124
|
-
SCIPION_USER_DATA = _get('SCIPION_USER_DATA', '~/ScipionUserData'
|
125
|
-
"Path where Scipion projects are or will be created. Defaults to ~/ScipionUserData"
|
126
|
-
|
127
|
-
SCIPION_TMP = _get('SCIPION_TMP', _join(SCIPION_USER_DATA, 'tmp'))
|
128
|
-
"General purpose scipion tmp folder. Defaults to SCIPION_USER_DATA/tmp"
|
208
|
+
SCIPION_USER_DATA = _get('SCIPION_USER_DATA', '~/ScipionUserData',
|
209
|
+
"Path where Scipion projects are or will be created. Defaults to ~/ScipionUserData", var_type=VarTypes.FOLDER)
|
129
210
|
|
130
211
|
# LOGGING variables
|
131
|
-
SCIPION_LOGS = _get('SCIPION_LOGS', _join(SCIPION_USER_DATA, 'logs')
|
132
|
-
"
|
133
|
-
|
134
|
-
SCIPION_LOG_CONFIG = _get('SCIPION_LOG_CONFIG', None)
|
135
|
-
"Optional. Path to a python logging configuration file fine tune the logging."
|
212
|
+
SCIPION_LOGS = _get('SCIPION_LOGS', _join(SCIPION_USER_DATA, 'logs'),
|
213
|
+
"Folder for Scipion logs used by the GUI. Defaults to SCIPION_USER_DATA/logs.", var_type=VarTypes.FOLDER)
|
136
214
|
|
137
|
-
|
138
|
-
"Path to
|
215
|
+
SCIPION_LOG_CONFIG = _get('SCIPION_LOG_CONFIG', None,
|
216
|
+
"Optional. Path to a python logging configuration file to fine tune the logging.", var_type=VarTypes.PATH)
|
139
217
|
|
140
|
-
|
141
|
-
"
|
218
|
+
SCIPION_LOG = _get('SCIPION_LOG', _join(SCIPION_LOGS, 'scipion.log'),
|
219
|
+
"Path to the file where scipion will write GUI logging messages. Defaults to SCIPION_LOGS/scipion.log", var_type=VarTypes.PATH)
|
142
220
|
|
143
|
-
|
144
|
-
"
|
221
|
+
SCIPION_LOG_FORMAT = _get('SCIPION_LOG_FORMAT', "%(message)s",
|
222
|
+
"str: Format for all the log lines, defaults to %(message)s. To compose the format see https://docs.python.org/3/library/logging.html#logrecord-attributes")
|
145
223
|
|
146
|
-
|
147
|
-
"
|
224
|
+
SCIPION_LOG_LEVEL = _get(SCIPION_LOG_LEVEL, 'INFO',
|
225
|
+
"Default logging level. String among CRITICAL, ERROR, WARNING, INFO, DEBUG, NOTSET. Default value is INFO.")
|
148
226
|
|
149
|
-
|
150
|
-
"
|
227
|
+
NO_COLOR = _get('NO_COLOR', '',
|
228
|
+
"str: Comply with https://no-color.org/ initiative. Set it to something different than '' to deactivate colors in the output.")
|
151
229
|
|
152
|
-
|
153
|
-
"Path to a
|
230
|
+
SCIPION_SCRATCH = _get(SCIPION_SCRATCH, None,
|
231
|
+
"Optional. Path to a location mounted in a scratch drive (SSD,...)")
|
154
232
|
|
155
|
-
|
156
|
-
"
|
233
|
+
SCIPION_TESTS_OUTPUT = _get('SCIPION_TESTS_OUTPUT', _join(SCIPION_USER_DATA, 'Tests'),
|
234
|
+
"Path to a folder where the output of the tests will be written. Defaults to SCIPION_USER_DATA/Tests.", var_type=VarTypes.FOLDER)
|
157
235
|
|
158
|
-
|
236
|
+
SCIPION_TEST_NOSYNC = _get('SCIPION_TEST_NOSYNC', FALSE_STR,
|
237
|
+
"Set it to 1, True, Yes or y to cancel test dataset synchronization. Needed when updating files in a dataset.") != FALSE_STR
|
159
238
|
|
160
|
-
|
239
|
+
SCIPION_SUPPORT_EMAIL = 'scipion@cnb.csic.es'
|
161
240
|
|
162
241
|
# Config variables
|
163
|
-
SCIPION_CONFIG = _get('SCIPION_CONFIG', 'scipion.conf')
|
164
|
-
"Path to the scipion configuration file where all this variables could be defined."
|
242
|
+
SCIPION_CONFIG = _get('SCIPION_CONFIG', _join('config','scipion.conf'),
|
243
|
+
"Path to the scipion configuration file where all this variables could be defined.", var_type=VarTypes.PATH)
|
165
244
|
|
166
|
-
SCIPION_LOCAL_CONFIG = _get('SCIPION_LOCAL_CONFIG', SCIPION_CONFIG
|
167
|
-
"Path to an optional/extra/user configuration file meant to overwrite default variables."
|
245
|
+
SCIPION_LOCAL_CONFIG = _get('SCIPION_LOCAL_CONFIG', SCIPION_CONFIG,
|
246
|
+
"Path to an optional/extra/user configuration file meant to overwrite default variables.", var_type=VarTypes.PATH)
|
168
247
|
|
169
|
-
SCIPION_HOSTS = _get('SCIPION_HOSTS', 'hosts.conf')
|
170
|
-
"Path to the host.cof file to allow scipion to use queue engines and run in HPC environments."
|
248
|
+
SCIPION_HOSTS = _get('SCIPION_HOSTS', _join('config','hosts.conf'),
|
249
|
+
"Path to the host.cof file to allow scipion to use queue engines and run in HPC environments.")
|
171
250
|
|
172
|
-
SCIPION_PROTOCOLS = _get('SCIPION_PROTOCOLS', 'protocols.conf')
|
173
|
-
""
|
251
|
+
SCIPION_PROTOCOLS = _get('SCIPION_PROTOCOLS', _join('config','protocols.conf'),
|
252
|
+
"Custom conf file to extend the protocols tree view panel (panel on the left)")
|
174
253
|
|
175
|
-
SCIPION_PLUGIN_JSON = _get('SCIPION_PLUGIN_JSON', None
|
176
|
-
"Optional. Path to get the json file with all the plugins available for Scipion."
|
254
|
+
SCIPION_PLUGIN_JSON = _get('SCIPION_PLUGIN_JSON', None,
|
255
|
+
"Optional. Path to get the json file with all the plugins available for Scipion.")
|
177
256
|
|
178
257
|
SCIPION_PLUGIN_REPO_URL = _get('SCIPION_PLUGIN_REPO_URL',
|
179
|
-
'
|
180
|
-
"Url from where to get the list of plugins."
|
258
|
+
'https://scipion.i2pc.es/getplugins/',
|
259
|
+
"Url from where to get the list of plugins.")
|
181
260
|
|
182
261
|
# REMOTE Section
|
183
|
-
SCIPION_URL =
|
184
|
-
SCIPION_URL_SOFTWARE =
|
185
|
-
SCIPION_URL_TESTDATA =
|
262
|
+
SCIPION_URL = 'https://scipion.cnb.csic.es/downloads/scipion'
|
263
|
+
SCIPION_URL_SOFTWARE = SCIPION_URL + '/software'
|
264
|
+
SCIPION_URL_TESTDATA = SCIPION_URL + '/data/tests'
|
186
265
|
|
187
266
|
# Scipion Notes
|
188
|
-
SCIPION_NOTES_FILE = _get(SCIPION_NOTES_FILE, 'notes.txt'
|
189
|
-
"Name of the file where to write per project notes."
|
267
|
+
SCIPION_NOTES_FILE = _get(SCIPION_NOTES_FILE, 'notes.txt',
|
268
|
+
"Name of the file where to write per project notes.")
|
190
269
|
|
191
|
-
SCIPION_NOTES_PROGRAM = _get(SCIPION_NOTES_PROGRAM, None
|
192
|
-
"Command or program to use to open the notes file. Otherwise system will extension association will take place."
|
270
|
+
SCIPION_NOTES_PROGRAM = _get(SCIPION_NOTES_PROGRAM, None,
|
271
|
+
"Command or program to use to open the notes file. Otherwise system will extension association will take place.")
|
193
272
|
|
194
273
|
SCIPION_NOTES_ARGS = _get(SCIPION_NOTES_ARGS, None)
|
195
274
|
|
196
275
|
# Aspect
|
197
|
-
SCIPION_FONT_NAME = _get('SCIPION_FONT_NAME', "Helvetica"
|
198
|
-
"Name of the font to use in Scipion GUI. Defaults to Helvetica."
|
276
|
+
SCIPION_FONT_NAME = _get('SCIPION_FONT_NAME', "Helvetica",
|
277
|
+
"Name of the font to use in Scipion GUI. Defaults to Helvetica.")
|
278
|
+
|
279
|
+
SCIPION_FONT_SIZE = _get('SCIPION_FONT_SIZE', SCIPION_DEFAULT_FONT_SIZE,
|
280
|
+
"Size of the 'normal' font to be used in Scipion GUI. Defaults to 10.", caster=int)
|
199
281
|
|
200
|
-
|
201
|
-
"
|
282
|
+
SCIPION_MAIN_COLOR = _get('SCIPION_MAIN_COLOR', Color.MAIN_COLOR,
|
283
|
+
"str: Main color of the GUI. Background will be white, so for better contrast choose a dark color. Probably any name here will work: https://matplotlib.org/stable/gallery/color/named_colors.html",
|
284
|
+
caster=validColor)
|
202
285
|
|
203
|
-
|
204
|
-
"str: Main color of the GUI.
|
286
|
+
SCIPION_BG_COLOR = _get('SCIPION_BG_COLOR', Color.BG_COLOR,
|
287
|
+
"str: Main background color of the GUI. Default is white, chose a light one. Probably any name here will work: https://matplotlib.org/stable/gallery/color/named_colors.html",
|
288
|
+
validColor)
|
205
289
|
|
206
|
-
|
207
|
-
"
|
290
|
+
SCIPION_CONTRAST_COLOR = _get('SCIPION_CONTRAST_COLOR', 'cyan',
|
291
|
+
"Color used to highlight features over grayscaled images.", caster=validColor)
|
208
292
|
|
209
|
-
|
210
|
-
"
|
293
|
+
SCIPION_SPRITES_FILE = _get('SCIPION_SPRITES_FILE', _join(getResourcesPath(),'sprites.png'),
|
294
|
+
"File (png) with the icons in a collage. Default is found at pyworkflow/resources/sprites.png. And a GIMP file could be found at the same folder in the github repo.")
|
295
|
+
|
296
|
+
SCIPION_SHOW_TEXT_IN_TOOLBAR = _get('SCIPION_SHOW_TEXT_IN_TOOLBAR', TRUE_STR,
|
297
|
+
"Define it to anything else except False to show the label of the icons. It will take more space.") == TRUE_STR
|
298
|
+
|
299
|
+
SCIPION_ICON_ZOOM = _get('SCIPION_ICON_ZOOM', 50,
|
300
|
+
"Define it to anything else except False to show the label of the icons. It will take more space.", var_type=VarTypes.INTEGER, caster=int)
|
211
301
|
|
212
302
|
# Notification
|
213
|
-
SCIPION_NOTIFY = _get('SCIPION_NOTIFY', TRUE_STR
|
214
|
-
"If set to False, Scipion developers will know almost nothing about Scipion usage and will have less information to improve it."
|
303
|
+
SCIPION_NOTIFY = _get('SCIPION_NOTIFY', TRUE_STR,
|
304
|
+
"If set to False, Scipion developers will know almost nothing about Scipion usage and will have less information to improve it.") == TRUE_STR
|
215
305
|
|
216
306
|
# *** Execution variables ***
|
217
|
-
SCIPION_CWD = _get('SCIPION_CWD', os.path.abspath(os.getcwd())
|
218
|
-
"Directory when scipion was launched"
|
307
|
+
SCIPION_CWD = _get('SCIPION_CWD', os.path.abspath(os.getcwd()),
|
308
|
+
"Directory when scipion was launched")
|
219
309
|
|
220
|
-
SCIPION_GUI_REFRESH_IN_THREAD = _get('SCIPION_GUI_REFRESH_IN_THREAD', FALSE_STR
|
221
|
-
"True to refresh the runs graph with a thread. Unstable."
|
310
|
+
SCIPION_GUI_REFRESH_IN_THREAD = _get('SCIPION_GUI_REFRESH_IN_THREAD', FALSE_STR,
|
311
|
+
"True to refresh the runs graph with a thread. Unstable.") != FALSE_STR
|
222
312
|
|
223
|
-
SCIPION_GUI_REFRESH_INITIAL_WAIT =
|
224
|
-
"Seconds to wait after a manual refresh"
|
313
|
+
SCIPION_GUI_REFRESH_INITIAL_WAIT = _get("SCIPION_GUI_REFRESH_INITIAL_WAIT", 5,
|
314
|
+
"Seconds to wait after a manual refresh", caster=int)
|
225
315
|
|
226
|
-
SCIPION_GUI_CANCEL_AUTO_REFRESH = _get("SCIPION_GUI_CANCEL_AUTO_REFRESH",FALSE_STR
|
227
|
-
"Set it to True to cancel automatic refresh of the runs."
|
316
|
+
SCIPION_GUI_CANCEL_AUTO_REFRESH = _get("SCIPION_GUI_CANCEL_AUTO_REFRESH",FALSE_STR,
|
317
|
+
"Set it to True to cancel automatic refresh of the runs.") != FALSE_STR
|
228
318
|
|
229
319
|
# Cancel shutil fast copy. In GPFS, shutil.copy does fail when trying a fastcopy and does not
|
230
|
-
#
|
231
|
-
SCIPION_CANCEL_FASTCOPY = _get('SCIPION_CANCEL_FASTCOPY', FALSE_STR
|
320
|
+
# fall back on the slow copy. For legacy reasons None is also False.
|
321
|
+
SCIPION_CANCEL_FASTCOPY = _get('SCIPION_CANCEL_FASTCOPY', FALSE_STR,
|
232
322
|
"Cancel fast copy done by shutil (copying files) when it fails. Has happened in GPFS environments. Defaults to False. None is also False otherwise fastcopy is cancelled."
|
323
|
+
) not in [NONE_STR, FALSE_STR]
|
233
324
|
|
234
325
|
# Priority package list: This variable is used in the view protocols in
|
235
326
|
# order to load first the plugins that contains the main protocols.conf
|
@@ -237,32 +328,32 @@ class Config:
|
|
237
328
|
# duplicating all the sections in all plugins. Scipion app is currently defining it for em tomo and chem
|
238
329
|
SCIPION_PRIORITY_PACKAGE_LIST = _get('SCIPION_PRIORITY_PACKAGE_LIST', EMPTY_STR)
|
239
330
|
|
240
|
-
SCIPION_STEPS_CHECK_SEC =
|
241
|
-
"Number of seconds to wait before checking if new input is available in streamified protocols."
|
331
|
+
SCIPION_STEPS_CHECK_SEC = _get('SCIPION_STEPS_CHECK_SEC', 5,
|
332
|
+
"Number of seconds to wait before checking if new input is available in streamified protocols.", caster=int)
|
242
333
|
|
243
|
-
SCIPION_UPDATE_SET_ATTEMPTS =
|
244
|
-
"Number of attempts to modify the protocol output before failing. The default value is 3"
|
334
|
+
SCIPION_UPDATE_SET_ATTEMPTS = _get('SCIPION_UPDATE_SET_ATTEMPTS', 3,
|
335
|
+
"Number of attempts to modify the protocol output before failing. The default value is 3", caster=int)
|
245
336
|
|
246
|
-
SCIPION_UPDATE_SET_ATTEMPT_WAIT =
|
247
|
-
"Time in seconds to wait until the next attempt when checking new outputs. The default value is 2 seconds"
|
337
|
+
SCIPION_UPDATE_SET_ATTEMPT_WAIT = _get('SCIPION_UPDATE_SET_ATTEMPT_WAIT', 2,
|
338
|
+
"Time in seconds to wait until the next attempt when checking new outputs. The default value is 2 seconds", caster=int)
|
248
339
|
|
249
|
-
SCIPION_USE_QUEUE = _get("SCIPION_USE_QUEUE", FALSE_STR
|
250
|
-
"Default value for using the queue. By default is False. ANY value will be True except and empty value. \"False\" or \"0\" will be True too."
|
340
|
+
SCIPION_USE_QUEUE = _get("SCIPION_USE_QUEUE", FALSE_STR,
|
341
|
+
"Default value for using the queue. By default is False. ANY value will be True except and empty value. \"False\" or \"0\" will be True too.")!= FALSE_STR
|
251
342
|
|
252
|
-
SCIPION_DEFAULT_EXECUTION_ACTION =
|
343
|
+
SCIPION_DEFAULT_EXECUTION_ACTION = _get('SCIPION_DEFAULT_EXECUTION_ACTION', DEFAULT_EXECUTION_ACTION_ASK,
|
253
344
|
"""Ask if you want to launch a single protocol or a sub-workflow. The default value is 1
|
254
345
|
1: Scipion always ask
|
255
346
|
2: Run a single protocol
|
256
|
-
3: Run a sub-workflow """
|
347
|
+
3: Run a sub-workflow """, caster=int)
|
257
348
|
|
258
349
|
try:
|
259
|
-
VIEWERS = ast.literal_eval(_get('VIEWERS', "{}"))
|
350
|
+
VIEWERS = ast.literal_eval(_get('VIEWERS', "{}", "Json string to define which viewer are the default ones per output type."))
|
260
351
|
except Exception as e:
|
261
352
|
VIEWERS = {}
|
262
353
|
logger.error("ERROR loading preferred viewers, VIEWERS variable will be ignored", exc_info=e)
|
263
354
|
|
264
|
-
SCIPION_DOMAIN = _get(SCIPION_DOMAIN, None)
|
265
|
-
SCIPION_TESTS_CMD = _get(SCIPION_TESTS_CMD, getTestsScript())
|
355
|
+
SCIPION_DOMAIN = _get(SCIPION_DOMAIN, None, "Domain base class. Ignore.")
|
356
|
+
SCIPION_TESTS_CMD = _get(SCIPION_TESTS_CMD, getTestsScript(), "Command to run tests")
|
266
357
|
|
267
358
|
# ---- Getters ---- #
|
268
359
|
# Getters are alternatives to offer a variable, but preventing it to be stored in the config
|
@@ -306,16 +397,10 @@ class Config:
|
|
306
397
|
for name, value in vars(baseCls).items():
|
307
398
|
# Skip methods and internal attributes starting with __
|
308
399
|
# (e.g __doc__, __module__, etc)
|
309
|
-
if
|
400
|
+
if isinstance(value, (str, int)) and not name.startswith('__'):
|
310
401
|
configVars[name] = str(value)
|
311
402
|
return configVars
|
312
403
|
|
313
|
-
@classmethod
|
314
|
-
def printVars(cls):
|
315
|
-
""" Print the variables' dict, mostly for debugging. """
|
316
|
-
from .utils import prettyDict
|
317
|
-
prettyDict(cls.getVars())
|
318
|
-
|
319
404
|
@classmethod
|
320
405
|
def getDomain(cls):
|
321
406
|
""" Import domain module from path or name defined in SCIPION_DOMAIN.
|
@@ -360,7 +445,8 @@ class Config:
|
|
360
445
|
|
361
446
|
@staticmethod
|
362
447
|
def debugSQLOn():
|
363
|
-
|
448
|
+
from .utils import envVarOn
|
449
|
+
return bool(envVarOn(SCIPION_DEBUG_SQLITE))
|
364
450
|
|
365
451
|
@staticmethod
|
366
452
|
def toggleDebugSQL():
|
@@ -377,7 +463,9 @@ class Config:
|
|
377
463
|
|
378
464
|
@classmethod
|
379
465
|
def getWizardMaskColor(cls):
|
380
|
-
|
466
|
+
""" Color is a name"""
|
467
|
+
from matplotlib.colors import to_rgb
|
468
|
+
return list(to_rgb(cls.SCIPION_CONTRAST_COLOR))
|
381
469
|
|
382
470
|
@classmethod
|
383
471
|
def getPriorityPackageList(cls):
|
@@ -409,16 +497,9 @@ class Config:
|
|
409
497
|
""" Returns a color lighter than the SCIPION_MAIN_COLOR"""
|
410
498
|
|
411
499
|
if cls.__activeColor is None:
|
412
|
-
import matplotlib.colors
|
413
500
|
from pyworkflow.utils import lighter, rgb_to_hex
|
414
|
-
|
415
|
-
|
416
|
-
except Exception:
|
417
|
-
logger.error("Cannot convert SCIPION_MAIN_COLOR (%s) string to a color to compute the lighter color."
|
418
|
-
" Falling back to %s" % (Config.SCIPION_MAIN_COLOR, Color.MAIN_COLOR))
|
419
|
-
cls.SCIPION_MAIN_COLOR = Color.MAIN_COLOR
|
420
|
-
rgb_main = matplotlib.colors.to_rgb(cls.SCIPION_MAIN_COLOR)
|
421
|
-
|
501
|
+
from matplotlib.colors import to_rgb
|
502
|
+
rgb_main = to_rgb(cls.SCIPION_MAIN_COLOR)
|
422
503
|
rgb_main = (rgb_main[0] * 255, rgb_main[1] * 255, rgb_main[2] * 255)
|
423
504
|
rgb_active = lighter(rgb_main, 0.3)
|
424
505
|
cls.__activeColor = rgb_to_hex(rgb_active)
|
@@ -42,7 +42,7 @@ VERSION_1 = '1.0.0'
|
|
42
42
|
VERSION_1_1 = '1.1.0'
|
43
43
|
VERSION_1_2 = '1.2.0'
|
44
44
|
VERSION_2_0 = '2.0.0'
|
45
|
-
VERSION_3_0 = '3.
|
45
|
+
VERSION_3_0 = '3.6.0'
|
46
46
|
|
47
47
|
# For a new release, define a new constant and assign it to LAST_VERSION
|
48
48
|
# The existing one has to be added to OLD_VERSIONS list.
|
@@ -182,7 +182,7 @@ class DOCSITEURLS:
|
|
182
182
|
DOCS = HOME + 'docs/'
|
183
183
|
CONFIG = DOCS + 'scipion-modes/scipion-configuration.html'
|
184
184
|
CONFIG_SECTION = CONFIG + '#%s'
|
185
|
-
CONTACTUS = '
|
185
|
+
CONTACTUS = 'https://scipion.i2pc.es/contact'
|
186
186
|
USER = DOCS + 'user/'
|
187
187
|
GUI = USER + 'scipion-gui.html'
|
188
188
|
WAIT_FOR = GUI + '#waiting-for-other-protocols'
|
@@ -200,6 +200,8 @@ class TK:
|
|
200
200
|
TREEVIEW_CLOSE = '<<TreeviewClose>>'
|
201
201
|
|
202
202
|
|
203
|
+
HELP_DURATION_FORMAT = "Duration format example: 1d 20h 30m 30s --> 1 day 20 hours 30 minutes and 30 seconds"
|
204
|
+
|
203
205
|
# Run protocol modes
|
204
206
|
DEFAULT_EXECUTION_ACTION_ASK = 1
|
205
207
|
DEFAULT_EXECUTION_ACTION_SINGLE = 2
|
@@ -34,6 +34,7 @@ import stat
|
|
34
34
|
import tkinter as tk
|
35
35
|
import time
|
36
36
|
import logging
|
37
|
+
|
37
38
|
logger = logging.getLogger(__name__)
|
38
39
|
|
39
40
|
import pyworkflow.utils as pwutils
|
@@ -124,7 +125,7 @@ class ObjectBrowser(tk.Frame):
|
|
124
125
|
img, desc = self.treeProvider.getObjectPreview(obj)
|
125
126
|
# Update image preview
|
126
127
|
if self.showPreviewTop:
|
127
|
-
if isinstance(img, str):
|
128
|
+
if isinstance(img, (str, pwutils.SpriteImage)):
|
128
129
|
img = self.getImage(img)
|
129
130
|
if img is None:
|
130
131
|
img = self.noImage
|
@@ -331,7 +332,7 @@ class FileTreeProvider(TreeProvider):
|
|
331
332
|
# All ok...add item.
|
332
333
|
fileInfoList.append(FileInfo(self._currentDir, f))
|
333
334
|
except Exception as e:
|
334
|
-
logger.
|
335
|
+
logger.info("Can't list files at " + self._currentDir, e)
|
335
336
|
|
336
337
|
# Sort objects
|
337
338
|
fileInfoList.sort(key=self.fileKey, reverse=not self.isSortingAscending())
|
@@ -360,7 +361,7 @@ SELECT_PATH = 3 # Can be either file or folder
|
|
360
361
|
|
361
362
|
|
362
363
|
class FileBrowser(ObjectBrowser):
|
363
|
-
""" The FileBrowser is a particular class of ObjectBrowser
|
364
|
+
""" The FileBrowser is a particular class of ObjectBrowser (Tk.Frame)
|
364
365
|
where the "objects" are just files and directories.
|
365
366
|
"""
|
366
367
|
|
@@ -416,13 +417,13 @@ class FileBrowser(ObjectBrowser):
|
|
416
417
|
# focuses on the browser in order to allow to move with the keyboard
|
417
418
|
self._goDir(os.path.abspath(initialDir))
|
418
419
|
|
419
|
-
if selectionType == SELECT_NONE:
|
420
|
-
selectButton = None
|
421
|
-
|
422
420
|
buttonsFrame = tk.Frame(self)
|
423
421
|
self._fillButtonsFrame(buttonsFrame)
|
424
422
|
buttonsFrame.grid(row=1, column=0)
|
425
423
|
|
424
|
+
# Callback to be called "on Select" button key press
|
425
|
+
self.onSelect=None
|
426
|
+
|
426
427
|
def _showInfo(self, msg):
|
427
428
|
""" Default way (logger.info to console) to show a message with a given info.
|
428
429
|
"""
|
@@ -634,7 +635,10 @@ class FileBrowser(ObjectBrowser):
|
|
634
635
|
self._lastSelected = self.getSelected()
|
635
636
|
|
636
637
|
if self._lastSelected is not None:
|
637
|
-
self.onSelect
|
638
|
+
if self.onSelect:
|
639
|
+
self.onSelect(self._lastSelected)
|
640
|
+
else:
|
641
|
+
self.onClose()
|
638
642
|
else:
|
639
643
|
self.showInfo('Select a valid file/folder')
|
640
644
|
|
@@ -686,6 +690,7 @@ def isStandardImage(filename):
|
|
686
690
|
class FileBrowserWindow(BrowserWindow):
|
687
691
|
""" Windows to hold a file browser frame inside. """
|
688
692
|
|
693
|
+
lastValue=None
|
689
694
|
def __init__(self, title, master=None, path=None,
|
690
695
|
onSelect=None, shortCuts=None, **kwargs):
|
691
696
|
BrowserWindow.__init__(self, title, master, **kwargs)
|
@@ -706,6 +711,8 @@ class FileBrowserWindow(BrowserWindow):
|
|
706
711
|
def getEntryValue(self):
|
707
712
|
return self.browser.getEntryValue()
|
708
713
|
|
714
|
+
def getLastSelection(self):
|
715
|
+
return self.browser._lastSelected.getPath()
|
709
716
|
def getCurrentDir(self):
|
710
717
|
return self.browser.getCurrentDir()
|
711
718
|
|
@@ -716,13 +723,4 @@ class FileBrowserWindow(BrowserWindow):
|
|
716
723
|
'.txt', '.log', '.out', '.err', '.stdout', '.stderr', '.emx',
|
717
724
|
'.json', '.xml', '.pam')
|
718
725
|
register(TextFileHandler(pwutils.Icon.PYTHON_FILE), '.py')
|
719
|
-
register(
|
720
|
-
register(SqlFileHandler(), '.sqlite', '.db')
|
721
|
-
# register(MdFileHandler(), '.xmd', '.star', '.pos', '.ctfparam', '.doc')
|
722
|
-
# register(ParticleFileHandler(),
|
723
|
-
# '.xmp', '.tif', '.tiff', '.spi', '.mrc', '.map', '.raw',
|
724
|
-
# '.inf', '.dm3', '.em', '.pif', '.psd', '.spe', '.ser', '.img',
|
725
|
-
# '.hed', *STANDARD_IMAGE_EXTENSIONS)
|
726
|
-
# register(VolFileHandler(), '.vol')
|
727
|
-
# register(StackHandler(), '.stk', '.mrcs', '.st', '.pif', '.dm4')
|
728
|
-
# register(ChimeraHandler(), '.bild')
|
726
|
+
register(SqlFileHandler(), '.sqlite', '.db')
|