Skip to main content

Utilities for VoxelAI jobspec containers

Project description

vai-jobspec-tools

Utilities for VoxelAI jobspec containers

PyPI Version codecov Tests Code Style Type Check

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,
    job_id: str,
    *,
    create: bool = True,
) -> str:
    """Generate a URI scoped to a particular subject, session, pipeline, version and job"""
    ...


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

vai_jobspec_tools-2.1.0.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

vai_jobspec_tools-2.1.0-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file vai_jobspec_tools-2.1.0.tar.gz.

File metadata

  • Download URL: vai_jobspec_tools-2.1.0.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.12.1 Linux/6.2.0-1018-azure

File hashes

Hashes for vai_jobspec_tools-2.1.0.tar.gz
Algorithm Hash digest
SHA256 c0ce6388eda86981cb22fbfcc53bb8006409172a925da6e6e6a0c4e6e7183e2e
MD5 a169e87f969650608e816e34b1833191
BLAKE2b-256 db098e8a1747240dbdeda74b998274c2691493aab05fb2c8ee05fd9942e7e252

See more details on using hashes here.

File details

Details for the file vai_jobspec_tools-2.1.0-py3-none-any.whl.

File metadata

  • Download URL: vai_jobspec_tools-2.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.12.1 Linux/6.2.0-1018-azure

File hashes

Hashes for vai_jobspec_tools-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1fed670bbe6dd10e38483ccdcb66f0015a62c8715a8132a9b1bf63cf4e3fe519
MD5 2be8e54895960cc2c8cd48555f0b72f3
BLAKE2b-256 c9ee73c31707a1eea4be728b4b909b6dfec2f1b6095dd43c2bbafd48f2748018

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page