From ff5befa17e5d1ef073bf98252119a65ae25ca742 Mon Sep 17 00:00:00 2001 From: Olivia Lynn Date: Mon, 12 Oct 2026 20:20:01 -0400 Subject: [PATCH 1/3] Change lbench-root option type to Path --- src/lbench/pytest/plugin.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lbench/pytest/plugin.py b/src/lbench/pytest/plugin.py index fd8c7c4..8af9d13 100644 --- a/src/lbench/pytest/plugin.py +++ b/src/lbench/pytest/plugin.py @@ -1,6 +1,7 @@ from __future__ import annotations from datetime import datetime +from pathlib import Path import pytest @@ -18,6 +19,7 @@ def pytest_addoption(parser): "--lbench-root", action="store", default=None, + type=Path, help="Root directory for lbench runs", ) From d0f53a8bac0f81603001f055988810fd507308da Mon Sep 17 00:00:00 2001 From: Olivia Lynn Date: Mon, 12 Oct 2026 20:22:09 -0400 Subject: [PATCH 2/3] Support user directory expansion for lbench root Add support for expanding user directory in lbench root path --- src/lbench/pytest/plugin.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lbench/pytest/plugin.py b/src/lbench/pytest/plugin.py index 8af9d13..4e3fbbb 100644 --- a/src/lbench/pytest/plugin.py +++ b/src/lbench/pytest/plugin.py @@ -31,6 +31,8 @@ def pytest_configure(config: pytest.Config): root = config.getoption("--lbench-root") if root is None: root = get_lbench_root_dir() + else: # Support paths like "~/results" + root = root.expanduser() run_id = datetime.now().strftime("%Y%m%d-%H%M%S") run_dir = root / run_id From b9fc38b7ab143dd2e80134f207ab8398587e255f Mon Sep 17 00:00:00 2001 From: Olivia Lynn Date: Mon, 12 Oct 2026 20:24:03 -0400 Subject: [PATCH 3/3] Fix environment variable name from LBENCH_ROOT_DIR to LBENCH_ROOT --- src/lbench/cli/env.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lbench/cli/env.py b/src/lbench/cli/env.py index f227e14..19d40e6 100644 --- a/src/lbench/cli/env.py +++ b/src/lbench/cli/env.py @@ -9,7 +9,7 @@ def get_lbench_root_dir() -> Path: Resolve the lbench root directory. Priority: - 1. $LBENCH_ROOT_DIR if set + 1. $LBENCH_ROOT if set 2. ./lbench_results relative to CWD The resolved path is created if missing and written back