Resolve a test name to its local folder path.#

resolve_local_test_path() translates a canonical test identifier (e.g. "T297") into the local Path of the folder that contains its raw data files, as configured in ~/sda.json.

This is the same resolution step that load_test() performs internally before reading any data. Call it directly when you need the folder path itself — for example to list all files, open the folder in a file manager, or pass the path to another tool.

See Also#

discover_data_file() :

Find the specific Excel file inside the resolved folder.

load_test() :

High-level function that calls resolve_local_test_path internally.

Resolve a single test name.#

Pass a canonical test ID such as "T297" and get back the Path of the folder that holds its data files.

from sda.api.file_discovery import discover_data_file, resolve_local_test_path

folder = resolve_local_test_path("T297")
print(f"Folder: {folder}")
print(f"Exists: {folder.exists()}")

List all files inside the resolved folder.#

Once you have the folder path you can glob for any file type — not just the primary Excel workbook.

xlsx_files = list(folder.glob("*.xls*"))
print(f"Excel files in {folder.name}:")
for f in xlsx_files:
    print(f"  {f.name}")

Combine with discover_data_file to get the exact file path.#

discover_data_file() picks the unique matching workbook from the folder returned by resolve_local_test_path.

data_file = discover_data_file(folder, "T297")
print(f"Data file: {data_file}")