Skip to content

Commit

Permalink
Merge pull request #198 from PolyJIT/f/settings-extend
Browse files Browse the repository at this point in the history
Make benchbuild's settings extensible by projects/experiments/reports.
  • Loading branch information
simbuerg committed Jul 10, 2018
2 parents 2ee4fe5 + d9c2f7c commit a4d4db3
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 31 deletions.
13 changes: 13 additions & 0 deletions benchbuild/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
"""
Setup plugins.
"""
from . import experiments as __EXPERIMENTS__
from . import projects as __PROJECTS__
from . import reports as __REPORTS__
from .settings import CFG as __CFG__
from .utils import settings as __SETTINGS__

__EXPERIMENTS__.discover()
__PROJECTS__.discover()
__REPORTS__.discover()
__SETTINGS__.setup_config(__CFG__)
18 changes: 0 additions & 18 deletions benchbuild/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,24 +255,6 @@
}
}

CFG["perf"] = {
"config": {
"default": None,
"desc": "A configuration for the pollyperformance experiment."
}
}

CFG["cs"] = {
"components": {
"default": None,
"desc": "List of filters for compilestats components."
},
"names": {
"default": None,
"desc": "List of filters for compilestats names."
}
}

CFG["uchroot"] = {
"repo": {
"default": "https://github.com/PolyJIT/erlent.git/",
Expand Down
13 changes: 0 additions & 13 deletions benchbuild/utils/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,19 +272,6 @@ def init_from_env(self):
for k in self.node:
self[k].init_from_env()

def update(self, cfg_dict):
"""
Update the configuration dictionary with new content.
This just delegates the update down to the internal data structure.
No validation is done on the format, be sure you know what you do.
Args:
cfg_dict: A configuration dictionary.
"""
self.node.update(cfg_dict.node)

def value(self):
"""
Return the node value, if we're a leaf node.
Expand Down

0 comments on commit a4d4db3

Please sign in to comment.