Skip to content

Commit

Permalink
Add helper function to apply configuration patches
Browse files Browse the repository at this point in the history
  • Loading branch information
boehmseb committed Sep 25, 2023
1 parent 9028290 commit 7cd84fa
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions varats-core/varats/experiment/experiment_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
PatchConfiguration,
Configuration,
)
from varats.experiment.steps.patch import ApplyPatch
from varats.paper.paper_config import get_paper_config
from varats.project.project_util import ProjectBinaryWrapper
from varats.project.sources import FeatureSource
Expand Down Expand Up @@ -770,3 +771,21 @@ def get_config_patches(project: VProject) -> PatchSet:
)

return patches


def get_config_patch_steps(project: VProject) -> tp.MutableSequence[Step]:
"""
Get a list of actions that apply all configuration patches to the project.
Args:
project: the project to be configured
Returns:
the actions that configure the project
"""
return list(
map(
lambda patch: ApplyPatch(project, patch),
get_config_patches(project)
)
)

0 comments on commit 7cd84fa

Please sign in to comment.