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-2.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b4fea240ad62ca2ea2b5c296f0a5da34daa7aeb5b72ece799751e4e76b93df3 |
|
MD5 | b36919579379e602a1a39919897961c4 |
|
BLAKE2b-256 | eb5861956090fc83c7c5b4a1e79e8238a2b0caca1a8f4c48f88ba7bab0969050 |