sda.analysis.loaders#
Supplementary file loaders shared across SDA analysis scripts.
Provides load_supplementary_xlsx(), a robust loader for non-standard
.xlsx files that live inside a test folder but are not registered as SDA
tables (e.g. T346_analyse_EP.xlsx).
The loader handles Windows file-lock issues by copying to a temp location before opening with openpyxl.
Functions#
|
Load a supplementary |
Module Contents#
- sda.analysis.loaders.load_supplementary_xlsx(test_name, filename=None, glob_patterns=None, sheet=0, label=None)#
Load a supplementary
.xlsxfrom the folder of an SDA test.Copies the file to a temporary location first so that Windows file locks (e.g. the file is open in Excel) do not prevent reading.
- Parameters:
test_name (
SDA test identifier (e.g. ````”T346”:py:class:`). Used` toresolve) – the folder viasda.api.file_discovery.resolve_local_test_path().filename (
Exact filenametoload (e.g. ````”T346_analyse_EP.xlsx”:py:class:`).`) – WhenNone, the first file matching glob_patterns is used.glob_patterns (
Glob patterns relativetothe test foldertosearch when) – filename is not given. Defaults to["*analyse*.xlsx", "*EP*.xlsx", "*ep*.xlsx"].sheet (
Sheet indexornametoparse. Defaultsto0(first sheet).)label (
Short label for log messages (defaults to) –"<test_name>-sup").
- Return type:
pandas.DataFrame— empty on any failure.