Utilities for VoxelAI jobspec containers
Project description
vai-jobspec-tools
Utilities for VoxelAI jobspec containers
Installation
pip install vai-jobspec-tools
API
from __future__ import annotations
import contextlib
import logging
from pathlib import Path
from typing import Iterator
def configure_logger(
logger: logging.Logger,
*,
verbosity: int = 0,
level: int | None = None,
):
"""Configure a logger with a level and custom stream handler."""
...
@contextlib.contextmanager
def optional_temporary_directory(workdir: str | Path | None = None) -> Iterator[Path]:
"""Create a temporary directory if one is not provided."""
...
def prepare_dst_uri(
uri: str,
subject_id: str,
session_id: str,
pipeline_name: str,
pipeline_version: str,
*,
create: bool = True,
) -> str:
"""Generate a URI scoped to a particular subject, session, pipeline, and version."""
...
def lowercase_alnum(s: str) -> str:
"""Transform a string so that it contains only lowercase alphanumeric characters."""
...
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for vai_jobspec_tools-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f7b6c46da40bd00c5ac2a8657bd48fa51e3349e46cd5034ab05faadd5fcb773 |
|
MD5 | 08503ea030af7e751c2ac1f7543fcac9 |
|
BLAKE2b-256 | fe883aa037da160ac647a1183bafdca5ebfd53853448da69ab0184942b2bebdf |