Skip to content

Commit

Permalink
Fix config map edge cases
Browse files Browse the repository at this point in the history
  • Loading branch information
boehmseb committed Sep 25, 2023
1 parent 7cd84fa commit d684ba1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
5 changes: 0 additions & 5 deletions varats-core/varats/experiment/experiment_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -724,11 +724,6 @@ def get_config(

config = config_map.get_configuration(config_id)

if config is None:
raise AssertionError(
"Requested config id was not in the map, but should be"
)

return config


Expand Down
19 changes: 10 additions & 9 deletions varats-core/varats/paper/case_study.py
Original file line number Diff line number Diff line change
Expand Up @@ -581,17 +581,18 @@ def load_configuration_map_from_case_study_file(
version_header.raise_if_version_is_less_than(1)

next(documents) # skip case study document
while True:
document = next(documents)
if not document:
raise AssertionError("Configuration missing from case study file.")
try:
while True:
document = next(documents)

if document["config_type"] == concrete_config_type.__name__:
break
if document["config_type"] == concrete_config_type.__name__:
break

return create_configuration_map_from_yaml_doc(
document, concrete_config_type
)
return create_configuration_map_from_yaml_doc(
document, concrete_config_type
)
except StopIteration:
return ConfigurationMap()


def store_case_study(case_study: CaseStudy, case_study_location: Path) -> None:
Expand Down

0 comments on commit d684ba1

Please sign in to comment.