Top-level API¶
Everything on this page is importable directly from openauc.
import openauc
openauc.load(...)
openauc.available_formats()
openauc.export_aucx(...)
openauc.inspect_aucx(...)
openauc.validate_aucx(...)
openauc.__version__
Loading¶
load
¶
load(
path: str | Path,
*,
format: str | None = None,
manifest: str | Path | None = None,
) -> AUCExperiment
Load a generic delimited AUC experiment into an AUCExperiment.
Also reads AUCX archives: a .aucx file, or any path with
format="aucx", is dispatched to the archive reader, which verifies every
stored checksum before building a model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str | Path
|
A directory containing a manifest and data file, a data-file path
with an adjacent manifest, a manifest-file path, or an |
required |
format
|
str | None
|
Optional explicit format id (overrides detection and the manifest's declared format for parser selection). |
None
|
manifest
|
str | Path | None
|
Optional explicit manifest-file path. |
None
|
Returns:
| Type | Description |
|---|---|
AUCExperiment
|
A canonical :class: |
AUCExperiment
|
an archive this is the provenance stored inside it, unchanged. |
Source code in src/openauc/formats/loader.py
Format discovery¶
available_formats
¶
Public descriptions of every registered format, sorted by id.
Covers both table parsers and archive formats.
Source code in src/openauc/formats/registry.py
Archives¶
export_aucx
¶
export_aucx(
experiment: AUCExperiment,
path: str | Path,
*,
overwrite: bool = False,
exported_at: datetime | None = None,
) -> Path
Write experiment to an AUCX archive and return the written path.
The archive is written to a sibling temporary file, verified by reading it back in full, and only then moved into place — so a failure never leaves a partial or corrupt archive at the destination.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
experiment
|
AUCExperiment
|
The experiment to archive. |
required |
path
|
str | Path
|
Destination |
required |
overwrite
|
bool
|
Replace an existing file. Refuses by default. |
False
|
exported_at
|
datetime | None
|
Timestamp recorded in the export provenance. Defaults to the current UTC time; pass a fixed value for byte-identical output. |
None
|
Returns:
| Type | Description |
|---|---|
Path
|
The path written. |
Raises:
| Type | Description |
|---|---|
ArchiveError
|
if the destination exists and |
Source code in src/openauc/formats/aucx.py
inspect_aucx
¶
Verify an archive's integrity and report what it declares.
This is container-level inspection only. It reports nothing about the structural or scientific standing of the experiment inside.
Source code in src/openauc/formats/aucx.py
validate_aucx
¶
Check an archive's integrity without raising.
Container-level validation only: readability, safety, member agreement and
checksums. Structural and readiness validation of the experiment inside
remain separate — load the archive and use experiment.validate().
Source code in src/openauc/formats/aucx.py
read_aucx
¶
Read an AUCX archive into an :class:AUCExperiment.
Every checksum is verified before any model is constructed. The returned
experiment carries the import provenance stored in the archive, unchanged,
so a round trip preserves it; the export record is available separately via
:func:inspect_aucx.
Raises:
| Type | Description |
|---|---|
ArchiveError
|
for unreadable, unsafe or inconsistent archives. |
ArchiveIntegrityError
|
for checksum problems. |
ArchiveVersionError
|
for an unsupported format version. |