Skip to content

Commit bb20c82

Browse files
authored
Merge pull request #168 from galaxyproject/make_resource_reqs_trump_defaults
Prioritize resource requirements over defaults
2 parents 69868d1 + be89b67 commit bb20c82

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

tests/test_mapper_resource_requirements.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def test_default_entity_creation_overrides_resource_requirements(self):
161161
destination = self._map_to_destination(tool, user, datasets)
162162

163163
self.assertIsNotNone(destination)
164-
assert destination.params["native_spec"] == "--mem 8 --cores 2 --gpus 2"
164+
assert destination.params["native_spec"] == "--mem 8 --cores 3 --gpus 2"
165165

166166
def test_user_defined_tool_correctly_routed(self):
167167
tool = mock_galaxy.Tool("user_defined", mock_galaxy.DynamicTool("08175037-030a-44c5-8468-c9d36cc29067"))

tpv/core/mapper.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,12 @@ def _find_entities_matching_id(
6565
entity_type: type[EntityType],
6666
) -> List[EntityType]:
6767
matches: List[EntityType] = []
68-
env_inherits = self.__get_environment_inherits(entity_type, context)
69-
if env_inherits:
70-
matches += [env_inherits]
7168
default_inherits = self.__get_default_inherits(entity_list)
7269
if default_inherits:
7370
matches += [default_inherits]
71+
env_inherits = self.__get_environment_inherits(entity_type, context)
72+
if env_inherits:
73+
matches += [env_inherits]
7474
for key in entity_list.keys():
7575
if self.lookup_tool_regex(key).match(entity_name):
7676
match = entity_list[key]

0 commit comments

Comments
 (0)