diff --git a/plot-requirements.txt b/plot-requirements.txt index d59ee6fbf..8a8d358e6 100644 --- a/plot-requirements.txt +++ b/plot-requirements.txt @@ -1,6 +1,6 @@ -r requirements.txt plotly matplotlib==3.7.3 -kaleido==0.2.1 +kaleido pandas pygraphviz diff --git a/unified_planning/engines/mixins/compiler.py b/unified_planning/engines/mixins/compiler.py index c21f85ad5..b7784241c 100644 --- a/unified_planning/engines/mixins/compiler.py +++ b/unified_planning/engines/mixins/compiler.py @@ -17,7 +17,7 @@ from unified_planning.model import ProblemKind from abc import ABC, abstractmethod from enum import Enum, auto -from typing import Dict, Optional, OrderedDict +from typing import Optional from warnings import warn from unified_planning.model.fnode import FNode diff --git a/unified_planning/engines/parallel.py b/unified_planning/engines/parallel.py index 56e13805d..239b167af 100644 --- a/unified_planning/engines/parallel.py +++ b/unified_planning/engines/parallel.py @@ -13,6 +13,7 @@ # limitations under the License. # + import warnings import unified_planning as up import unified_planning.engines as engines diff --git a/unified_planning/engines/results.py b/unified_planning/engines/results.py index 9b61927bc..d3762f186 100644 --- a/unified_planning/engines/results.py +++ b/unified_planning/engines/results.py @@ -14,6 +14,7 @@ # """This module defines the PlanGenerationResult class.""" + from fractions import Fraction import unified_planning as up from unified_planning.exceptions import UPUsageError, UPValueError diff --git a/unified_planning/test/test_anml_reader.py b/unified_planning/test/test_anml_reader.py index b118517bc..7689007ef 100644 --- a/unified_planning/test/test_anml_reader.py +++ b/unified_planning/test/test_anml_reader.py @@ -713,7 +713,6 @@ def test_anml_io(self): or kind.has_interpreted_functions_in_numeric_assignments() or kind.has_interpreted_functions_in_object_assignments() or kind.has_interpreted_functions_in_conditions() - # could be done more cleanly with an has_interpreted_functions() imlpementation ): continue with tempfile.TemporaryDirectory() as tempdir: diff --git a/unified_planning/test/test_partial_order_plan.py b/unified_planning/test/test_partial_order_plan.py index 441cfeb3b..9df20bdc0 100644 --- a/unified_planning/test/test_partial_order_plan.py +++ b/unified_planning/test/test_partial_order_plan.py @@ -13,7 +13,6 @@ # limitations under the License. -import pytest import unified_planning as up from unified_planning.shortcuts import * from unified_planning.model.problem_kind import basic_classical_kind, hierarchical_kind diff --git a/unified_planning/test/test_pddl_io.py b/unified_planning/test/test_pddl_io.py index ee0238c98..d49139e4c 100644 --- a/unified_planning/test/test_pddl_io.py +++ b/unified_planning/test/test_pddl_io.py @@ -542,7 +542,7 @@ def test_examples_io(self): or kind.has_interpreted_functions_in_numeric_assignments() or kind.has_interpreted_functions_in_object_assignments() or kind.has_interpreted_functions_in_conditions() - ) # could be done more cleanly with an has_interpreted_functions() imlpementation + ) ): continue with tempfile.TemporaryDirectory() as tempdir: diff --git a/unified_planning/test/test_planner.py b/unified_planning/test/test_planner.py index 355b9027f..c6eceec87 100644 --- a/unified_planning/test/test_planner.py +++ b/unified_planning/test/test_planner.py @@ -15,7 +15,6 @@ from typing import Callable import warnings - import unified_planning as up from unified_planning.shortcuts import * from unified_planning.model.problem_kind import ( @@ -98,8 +97,8 @@ def test_basic_parameters(self): @skipIfEngineNotAvailable("tamer") def test_basic_parallel(self): problem = self.problems["basic"].problem - # print (problem) a = problem.action("a") + with OneshotPlanner( names=["tamer", "tamer"], params=[{"heuristic": "hadd"}, {"heuristic": "hmax"}], @@ -153,8 +152,8 @@ def test_basic_oversubscription(self): @skipIfEngineNotAvailable("tamer") def test_basic_oversubscription_parallel(self): problem = self.problems["basic_oversubscription"].problem - # print(problem) a = problem.action("a") + with OneshotPlanner( names=["oversubscription[tamer]", "oversubscription[tamer]"], params=[{"heuristic": "hadd"}, {"heuristic": "hmax"}], @@ -172,7 +171,6 @@ def test_basic_oversubscription_parallel(self): @skipIfEngineNotAvailable("tamer") def test_timed_connected_locations_parallel(self): problem = self.problems["timed_connected_locations"].problem - # print(problem) move = problem.action("move") with OneshotPlanner( names=["tamer", "tamer"], diff --git a/unified_planning/test/test_protobuf_io.py b/unified_planning/test/test_protobuf_io.py index 7a1c45849..8fd055d8b 100644 --- a/unified_planning/test/test_protobuf_io.py +++ b/unified_planning/test/test_protobuf_io.py @@ -410,7 +410,6 @@ def test_all_problems(self): or kind.has_interpreted_functions_in_numeric_assignments() or kind.has_interpreted_functions_in_object_assignments() or kind.has_interpreted_functions_in_conditions() - # could be done more cleanly with an has_interpreted_functions() imlpementation ): continue problem_pb = self.pb_writer.convert(problem)