API: Top level and utilities

Generated from each module's __all__ by python -m vaft._api_catalog: 25 published objects in 5 modules. Signatures and summaries are read from the source; nothing here is written by hand. All API pages

vaft.compat

Runtime compatibility helpers for dependency and platform differences.

apply_runtime_compat_patches

function source
apply_runtime_compat_patches() -> None

Apply broad NumPy/SciPy shims that are safe for all runtime paths.

Also exported as vaft.apply_runtime_compat_patches.

cumtrapz_compat

function source
cumtrapz_compat(y, x=None, dx=1.0, axis: int = -1, initial=0.0)

Evaluate cumulative trapezoidal integration across SciPy versions.

ensure_home_environment

function source
ensure_home_environment() -> str | None

Set HOME from the platform home on native Windows when absent.

executable_candidates

function source
executable_candidates(path: str | Path) -> tuple[Path, ...]

Return the filenames that could satisfy a request for path.

executable_suffixes

function source
executable_suffixes() -> tuple[str, ...]

Return the suffixes this platform appends when launching a program.

is_executable

function source
is_executable(path: str | Path) -> bool

Report whether this platform can start path as a program.

IS_WINDOWS

data
IS_WINDOWS = False

remove_directory

function source
remove_directory(path: str | Path, *, missing_ok: bool = True) -> bool

Delete a directory tree; return whether it is now gone.

reopenable_temporary_file

function source
reopenable_temporary_file(*, suffix: str = '', prefix: str = 'vaft-') -> Iterator[Path]

Yield a path to a temporary file another library may open by name.

resolve_executable

function source
resolve_executable(path: str | Path) -> Path | None

Return the file that satisfies path on this platform, or None.

short_temporary_directory

function source
short_temporary_directory(*, max_length: int, prefix: str = 'vaft-') -> Iterator[Path]

Like temporary_directory, but the path is at most max_length.

temporary_directory

function source
temporary_directory(*, prefix: str = 'vaft-') -> Iterator[Path]

Like tempfile.TemporaryDirectory, but never raises on cleanup.

trapz_compat

function source
trapz_compat(y, x=None, dx=1.0, axis: int = -1)

Evaluate trapezoidal integration across NumPy versions.

user_home

function source
user_home() -> Path

Return the user’s home directory on any platform.

vaft.ods_access

Non-mutating dotted-path access for ODS objects and plain mappings (issue #118).

accessor_for

function source
accessor_for(obj: Any) -> PathAccessor

The accessor that reads obj; a raw native IMAS object is refused.

get_path

function source
get_path(source: Any, path: str) -> Any

Read a dotted path that the caller’s contract requires to be present.

Also exported as vaft.machine_mapping.utils.get_path.

ODS_ACCESSOR

data
ODS_ACCESSOR = <vaft.ods_access._ODSAccessor>

Also exported as vaft.plot.backend.access.ODS_ACCESSOR.

path_count

function source
path_count(source: Any, path: str) -> int

Length of the container at path, 0 when it is absent or empty.

Also exported as vaft.machine_mapping.utils.path_count.

path_exists

function source
path_exists(source: Any, path: str) -> bool

Whether a dotted path resolves to actual content, without creating it.

Also exported as vaft.machine_mapping.utils.path_exists.

path_value

function source
path_value(source: Any, path: str, default: Any = None) -> Any

The value at path, or default when it carries no content.

Also exported as vaft.machine_mapping.utils.path_value.

PathAccessor

class source
PathAccessor(*args, **kwargs)

How one data model answers IMAS-DD dotted paths, without mutation.

Also exported as vaft.plot.backend.access.PathAccessor.

3 members

register_accessor

function source
register_accessor(predicate: Callable[[Any], bool], accessor: PathAccessor) -> None

Route objects for which predicate holds to accessor.

Also exported as vaft.plot.backend.access.register_accessor.

set_path

function source
set_path(source: Any, path: str, value: Any) -> None

Write a dotted path into either a plain dict or an OMAS ODS object.

Also exported as vaft.machine_mapping.utils.set_path.

vaft.spectroscopy

Deprecated module vaft.spectroscopy is deprecated and will be removed in vaft 0.10.0; import vaft.data.atomic (elements, species) or va...

Deprecated alias of vaft.data.atomic and vaft.data.spectroscopy.

parse_species

functionDeprecated source
parse_species(text: Any) -> Species | None

Deprecated: the species of any emission= term, series terms included.

Deprecated: vaft.spectroscopy is deprecated and will be removed in vaft 0.10.0; import vaft.data.atomic (elements, species) or va...

vaft.version

__version__

data
__version__ = '0.8.0'

Also exported as vaft.__version__.

results matching ""

    No results matching ""