From e8fc9e1190ae83e5a4448026e8e9021bff429c7c Mon Sep 17 00:00:00 2001 From: joncrall Date: Mon, 25 Apr 2022 14:08:03 -0400 Subject: [PATCH 1/6] Add proper default to disable --- tests/benchmark.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/benchmark.py b/tests/benchmark.py index 8d37b6a..95b4b3e 100644 --- a/tests/benchmark.py +++ b/tests/benchmark.py @@ -448,6 +448,7 @@ def main(): nargs="+", choices=known_libraries, help=("Remove specified libraries from the benchmarks"), + default=[], ) parser.add_argument( From 2c9e70f9654c50cc1eba97b7a55d2e8a1dbac454 Mon Sep 17 00:00:00 2001 From: joncrall Date: Mon, 25 Apr 2022 14:11:11 -0400 Subject: [PATCH 2/6] Run benchmarks in CI when they are changed --- .github/workflows/benchmark.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 27659e7..1def7f2 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -4,6 +4,10 @@ on: push: branches: - main + pull_request: + paths: + - ".github/workflows/benchmark.yml" + - "tests/benchmark.py" jobs: build: From c5d2a07ee6ae0fbc4e7be0492e0e51e9681e1279 Mon Sep 17 00:00:00 2001 From: Jon Crall Date: Tue, 26 Apr 2022 12:30:37 -0400 Subject: [PATCH 3/6] Update tests/benchmark.py Co-authored-by: Hugo van Kemenade --- tests/benchmark.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/benchmark.py b/tests/benchmark.py index 95b4b3e..cc0501d 100644 --- a/tests/benchmark.py +++ b/tests/benchmark.py @@ -447,7 +447,7 @@ def main(): "--disable", nargs="+", choices=known_libraries, - help=("Remove specified libraries from the benchmarks"), + help="Remove specified libraries from the benchmarks", default=[], ) From f63a3e471eea256e838249b0362e5a5b89cf3e65 Mon Sep 17 00:00:00 2001 From: joncrall Date: Tue, 26 Apr 2022 12:31:49 -0400 Subject: [PATCH 4/6] Spelling --- tests/benchmark.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/benchmark.py b/tests/benchmark.py index cc0501d..971dfd3 100644 --- a/tests/benchmark.py +++ b/tests/benchmark.py @@ -471,7 +471,7 @@ def main(): else: enabled_libraries[libname] = module - # Ensure the modules are avilable in a the global scope + # Ensure the modules are available in the global scope for libname, module in enabled_libraries.items(): print(f"Enabled {libname} benchmarks") globals()[libname] = module From 0e280117f2d33e2d115bde8f3709653a978f3370 Mon Sep 17 00:00:00 2001 From: joncrall Date: Tue, 26 Apr 2022 12:32:37 -0400 Subject: [PATCH 5/6] Spelling --- tests/benchmark.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/benchmark.py b/tests/benchmark.py index 971dfd3..af1e8c2 100644 --- a/tests/benchmark.py +++ b/tests/benchmark.py @@ -460,10 +460,10 @@ def main(): args = parser.parse_args() - disabled_libraires = set(args.disable) + disabled_libraries = set(args.disable) enabled_libraries = {} for libname in known_libraries: - if libname not in disabled_libraires: + if libname not in disabled_libraries: try: module = importlib.import_module(libname) except ImportError: From 4e527b84b0466e5009c59de48a12404ef2c68ccd Mon Sep 17 00:00:00 2001 From: joncrall Date: Tue, 26 Apr 2022 17:14:06 -0400 Subject: [PATCH 6/6] remove paren --- tests/benchmark.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/benchmark.py b/tests/benchmark.py index af1e8c2..2199cc4 100644 --- a/tests/benchmark.py +++ b/tests/benchmark.py @@ -455,7 +455,7 @@ def main(): "--factor", type=float, default=1.0, - help=("Specify as a fraction speed up benchmarks for development / testing"), + help="Specify as a fraction speed up benchmarks for development / testing", ) args = parser.parse_args()