Skip to content

Manifest

geneva.manifest.mgr.GenevaManifest

A Geneva Manifest represents the files and dependencies used in the execution environment.

name

name: str = field()

version

version: Optional[str] = field(default=None)

pip

pip: list[str] = field(default=[])

py_modules

py_modules: list[str] = field(default=[])

head_image

head_image: Optional[str] = field(default=None)

worker_image

worker_image: Optional[str] = field(default=None)

skip_site_packages

skip_site_packages: bool = field(default=True)

delete_local_zips

delete_local_zips: bool = field(default=False)

local_zip_output_dir

local_zip_output_dir: Optional[str] = field(default=None)

zips

zips: list[list[str]] = field(default=[[]])

checksum

checksum: Optional[str] = field(default=None)

created_at

created_at: datetime = field(
    factory=lambda: now(utc),
    metadata={"pa_type": timestamp("us", tz="UTC")},
)

created_by

created_by: str = field(factory=current_user)

requirements_path

requirements_path: Optional[str] = field(default=None)

conda

conda: dict[str, Any] = field(
    default={}, metadata={"pa_type": string()}
)

conda_environment_path

conda_environment_path: Optional[str] = field(default=None)

compute_checksum

compute_checksum() -> str

Generate a stable checksum of the manifest, ignoring the checksum field. The zip file names include the checksum of the contents so this hash is comprehensive.

create_pip

create_pip(name: str) -> PipManifestBuilder

Create a pip-based manifest builder.

Example: manifest = GenevaManifest.create_pip("my-manifest").pip(["numpy"]).build()

create_conda

create_conda(name: str) -> CondaManifestBuilder

Create a conda-based manifest builder.

Example: manifest = GenevaManifest.create_conda("my-manifest").conda({...}).build()

create_site

create_site(name: str) -> SiteManifestBuilder

Create a site-packages manifest builder.

Uploads local site-packages without external dependencies. upload_site_packages defaults to True.

Example: manifest = GenevaManifest.create_site("my-manifest").build()

as_dict

as_dict() -> dict

geneva.manifest.builder.PipManifestBuilder

Bases: _ManifestBuilderBase

Type-safe builder for pip-based manifests.

This builder does NOT have conda methods - use CondaManifestBuilder for conda.

Example:

manifest = (
    PipManifestBuilder.create("my-manifest")
    .pip(["numpy", "pandas"])
    .build()
)

pip

pip(packages: list[str]) -> PipManifestBuilder

Set the runtime pip packages list.

Cannot be used with .requirements_path().

add_pip

add_pip(package: str) -> PipManifestBuilder

Add a single pip package to the runtime environment.

requirements_path

requirements_path(path: str) -> PipManifestBuilder

Set the path to a requirements.txt file.

Cannot be used with .pip().

build

build() -> GenevaManifest

Build the GenevaManifest with pip configuration.

create

create(name: str) -> PipManifestBuilder

Create a new pip manifest builder with the given name.

geneva.manifest.builder.CondaManifestBuilder

Bases: _ManifestBuilderBase

Type-safe builder for conda-based manifests.

This builder does NOT have pip methods - use PipManifestBuilder for pip.

Example:

manifest = (
    CondaManifestBuilder.create("my-manifest")
    .conda({"dependencies": ["python=3.10", "numpy"]})
    .build()
)

conda

conda(dependencies: dict[str, Any]) -> CondaManifestBuilder

Set the conda dependencies for the runtime environment.

Cannot be used with .conda_environment_path().

conda_environment_path

conda_environment_path(path: str) -> CondaManifestBuilder

Set the path to a conda environment.yml file.

Cannot be used with .conda().

build

build() -> GenevaManifest

Build the GenevaManifest with conda configuration.

create

create(name: str) -> CondaManifestBuilder

Create a new conda manifest builder with the given name.

geneva.manifest.builder.SiteManifestBuilder

Bases: _ManifestBuilderBase

Type-safe builder for site-packages manifests.

This builder uploads local site-packages without external dependencies. It does NOT have pip or conda methods.

upload_site_packages defaults to True for this builder.

Example:

manifest = SiteManifestBuilder.create("my-manifest").build()

build

build() -> GenevaManifest

Build the GenevaManifest with site-packages configuration.

create

create(name: str) -> SiteManifestBuilder

Create a new site manifest builder with the given name.