Skip to content

Commit 87e6f0b

Browse files
committed
allow to override project root
1 parent 0288f2f commit 87e6f0b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

qa/tools/apex_algorithm_qa_tools/scenarios.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,12 @@ def from_dict(cls, data: dict) -> BenchmarkScenario:
5656
)
5757

5858

59-
def get_benchmark_scenarios() -> List[BenchmarkScenario]:
59+
def get_benchmark_scenarios(root = None) -> List[BenchmarkScenario]:
6060
# TODO: instead of flat list, keep original grouping/structure of benchmark scenario files?
6161
# TODO: check for uniqueness of scenario IDs? Also make this a pre-commit lint tool?
6262
scenarios = []
6363
# old style glob is used to support symlinks
64-
for path in glob.glob(str(get_project_root() / "algorithm_catalog") + "/**/*benchmark_scenarios*/*.json", recursive=True):
64+
for path in glob.glob(str( (root or get_project_root()) / "algorithm_catalog") + "/**/*benchmark_scenarios*/*.json", recursive=True):
6565
with open(path) as f:
6666
data = json.load(f)
6767
# TODO: support single scenario files in addition to listings?

0 commit comments

Comments
 (0)