API Reference

This page is generated from the public Python docstrings.

Workspace Discovery

find_workspace_root

Walk upward from start until a publication workspace root is found.

Decorators

figure

Mark a callable as an exported publication figure entrypoint.

stat

Mark a callable as a computed publication stat entrypoint.

table

Mark a callable as a generated publication table entrypoint.

data

load_publication_data_npz(path)

Load a pinned .npz file into detached NumPy arrays.

publication_data_path(publication_id, relative_path, *, workspace_root=None)

Resolve one pinned publication-data path under the configured workspace data_root.

save_publication_data_npz(publication_id, relative_path, *, overwrite=False, workspace_root=None, **arrays)

Save arrays as a pinned .npz file under a publication's data root.

external_data

Declare a loader that reads from one configured external data root.

Publication Data Helpers

publication_data_path

Resolve one pinned publication-data path under the configured workspace data_root.

save_publication_data_npz

Save arrays as a pinned .npz file under a publication's data root.

load_publication_data_npz

Load a pinned .npz file into detached NumPy arrays.

Export Model

FigurePanel

One exported panel plus optional per-panel export metadata and overrides.

FigureExport

Normalized logical-figure export payload for the publication runtime.

panel

Wrap one panel with optional per-panel subcaption sizing and overrides.

Table Model

TableResult

Normalized logical-table payload for the publication runtime.

CLI Entrypoint

main

Run the pubs CLI and return its process exit code.