-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move context variables from experiment set to context object
Creates a context object and moves context variables from the experiment set indexed by context to a dict of context objects indexed by context.
- Loading branch information
Showing
3 changed files
with
82 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Copyright 2022-2023 Google LLC | ||
# | ||
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | ||
# https://www.apache.org/licenses/LICENSE-2.0> or the MIT license | ||
# <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your | ||
# option. This file may not be copied, modified, or distributed | ||
# except according to those terms. | ||
|
||
|
||
class Context(object): | ||
"""Class to represent a context | ||
This class contains variable definitions to store any individual context | ||
(such as application, workload, or experiment) and logic to merge in | ||
additional contexts by order of precedence.""" | ||
|
||
def __init__(self): | ||
"""Constructor for a Context | ||
Create a Context object, which holds context attributes. | ||
""" | ||
self.env_variables = None | ||
self.variables = None | ||
self.internals = None | ||
self.templates = None | ||
self.chained_experiments = None | ||
self.modifiers = None | ||
self.context_names = None | ||
self.exclude = None | ||
self.zips = None | ||
self.matrices = None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters