ResultWriter

Note

This page is a reference documentation. It only explains the class signature, and not how to use it. Please refer to the Habitat Guide and Python API guide (v2.0) for usage.

class ResultWriter(*args, **kwargs)[source]

Bases: Protocol

Anything that can persist HABIT outputs.

Separating the writer from the algorithms is what allows a caller to run a full habitat analysis entirely in memory, which is impossible in v0.1 where every workflow writes to an output directory by construction.

write_habitat_map(habitat_map: HabitatMap) → str | None[source]

Persist one habitat map and return its location, when applicable.

write_feature_table(table: FeatureTable, name: str) → str | None[source]

Persist one feature table and return its location, when applicable.

write_habitat_model(model: HabitatModel) → str | None[source]

Persist a fitted habitat model and return its location.

write_manifest(manifest: RunManifest) → str | None[source]

Persist the run manifest and return its location, when applicable.

__init__(*args, **kwargs)