From 8174a918ea3b7cb216bf7ea98cfdc10661b5c37d Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Wed, 6 May 2020 16:56:32 +0200 Subject: make the whole project more python idiomatic * rename src directory to allocbench * make global variable names UPPERCASE * format a lot of code using yapf * use lowercase ld_preload and ld_library_path as Allocator members * name expected Errors 'err' and don't raise a new Exception * disable some pylint messages --- scripts/print_facts.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'scripts/print_facts.py') diff --git a/scripts/print_facts.py b/scripts/print_facts.py index 831cc78..389028e 100755 --- a/scripts/print_facts.py +++ b/scripts/print_facts.py @@ -29,9 +29,10 @@ CURRENTDIR = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentfram PARENTDIR = os.path.dirname(CURRENTDIR) sys.path.insert(0, PARENTDIR) -import src.facter -from src.plots import print_facts, print_common_facts -from src.util import print_error +import allocbench.facter as facter +from allocbench.globalvars import BENCHMARKS +from allocbench.plots import print_facts, print_common_facts +from allocbench.util import print_error def main(): @@ -40,15 +41,15 @@ def main(): args = parser.parse_args() # Load common facts - src.facter.load_facts(args.results) + facter.load_facts(args.results) print_common_facts() cwd = os.getcwd() os.chdir(args.results) - for benchmark in src.globalvars.benchmarks: - bench_module = importlib.import_module(f"src.benchmarks.{benchmark}") + for benchmark in BENCHMARKS: + bench_module = importlib.import_module(f"allocbench.benchmarks.{benchmark}") if not hasattr(bench_module, benchmark): print_error(f"{benchmark} has no member {benchmark}") -- cgit v1.2.3