diff --git a/requirements.txt b/requirements.txt index c16c2303..fad13c39 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -e git+https://github.com/spine-tools/Spine-Database-API.git@0.8-dev#egg=spinedb_api --e git+https://github.com/spine-tools/spine-engine.git@0.8-dev#egg=spine_engine --e git+https://github.com/spine-tools/Spine-Toolbox.git@0.8-dev#egg=spinetoolbox +-e git+https://github.com/spine-tools/spine-engine.git@jumpster#egg=spine_engine +-e git+https://github.com/spine-tools/Spine-Toolbox.git@issue_2523#egg=spinetoolbox -e . diff --git a/spine_items/db_writer_item_base.py b/spine_items/db_writer_item_base.py index a943b12e..2dc25986 100644 --- a/spine_items/db_writer_item_base.py +++ b/spine_items/db_writer_item_base.py @@ -12,6 +12,7 @@ """Contains base classes for items that write to db.""" from PySide6.QtCore import Slot +from spine_engine.utils.helpers import ExecutionDirection from spinetoolbox.project_item.project_item import ProjectItem @@ -27,7 +28,7 @@ def successor_data_stores(self): @Slot(object, object) def handle_execution_successful(self, execution_direction, engine_state): """Notifies Toolbox of successful database import.""" - if execution_direction != "FORWARD": + if execution_direction != ExecutionDirection.FORWARD: return committed_db_maps = set() for successor in self.successor_data_stores(): diff --git a/spine_items/exporter/exporter.py b/spine_items/exporter/exporter.py index ae245941..aa42afb7 100644 --- a/spine_items/exporter/exporter.py +++ b/spine_items/exporter/exporter.py @@ -16,10 +16,10 @@ from operator import itemgetter from pathlib import Path from PySide6.QtCore import Slot, Qt - from spinetoolbox.helpers import SealCommand from spinetoolbox.project_item.project_item import ProjectItem from spine_engine.utils.serialization import deserialize_path +from spine_engine.utils.helpers import ExecutionDirection from spinedb_api import clear_filter_configs from .export_manifest import exported_files_as_resources from .specification import OutputFormat @@ -112,7 +112,7 @@ def has_out_url(self): def handle_execution_successful(self, execution_direction, engine_state): """See base class.""" - if execution_direction != "FORWARD": + if execution_direction != ExecutionDirection.FORWARD: return self._resources_to_successors_changed() diff --git a/spine_items/tool/tool.py b/spine_items/tool/tool.py index d334409e..d3b2a919 100644 --- a/spine_items/tool/tool.py +++ b/spine_items/tool/tool.py @@ -18,7 +18,7 @@ from spinetoolbox.mvcmodels.file_list_models import FileListModel from spine_engine.config import TOOL_OUTPUT_DIR from spine_engine.project_item.project_item_resource import CmdLineArg, make_cmd_line_arg, LabelArg -from spine_engine.utils.helpers import resolve_python_interpreter, resolve_julia_executable +from spine_engine.utils.helpers import resolve_python_interpreter, resolve_julia_executable, ExecutionDirection from .commands import ( UpdateKillCompletedProcesses, UpdateToolExecuteInWorkCommand, @@ -503,7 +503,7 @@ def _check_notifications(self): def handle_execution_successful(self, execution_direction, engine_state): """See base class.""" super().handle_execution_successful(execution_direction, engine_state) - if execution_direction != "FORWARD": + if execution_direction != ExecutionDirection.FORWARD: return self._resources_to_successors_changed() diff --git a/tests/data_store/test_dataStore.py b/tests/data_store/test_dataStore.py index 6784ac64..e635bc87 100644 --- a/tests/data_store/test_dataStore.py +++ b/tests/data_store/test_dataStore.py @@ -34,6 +34,7 @@ create_toolboxui_with_project, ) + class TestDataStore(unittest.TestCase): def test_item_type(self): """Tests that the item type is correct.""" @@ -140,9 +141,7 @@ def test_dirty_db_notification(self): # Check that the warning disappears after committing the changes self._toolbox.db_mngr.commit_session("Added entity classes", db_map) self.ds._check_notifications() - self.assertEqual( - [], self.ds.get_icon().exclamation_icon._notifications - ) + self.assertEqual([], self.ds.get_icon().exclamation_icon._notifications) # noinspection PyUnusedLocal