CrocoDash package#

Subpackages#

Submodules#

CrocoDash.case module#

CrocoDash.case_state module#

case_state.py — Serialization policy and I/O for the CrocoDash case state file.

The case state is written to _crocodash_state.json inside the case root at the end of Case.__init__. This module owns:

  • the schema version used to gate compatibility checks;

  • which Case.__init__ arguments are excluded from the state snapshot (INIT_ARGS_EXCLUDE);

  • which state-file keys are derived (i.e. cannot be passed straight back to Case.__init__) and therefore need explicit handling when reconstructing a case from the file (DERIVED_KEYS);

  • the write, read, and check_version functions.

Keeping both INIT_ARGS_EXCLUDE and DERIVED_KEYS here makes the serialisation contract visible and co-located: when the state schema changes, this is the single file to update.

CrocoDash.case_state.check_version(state, state_path)#

Raise ValueError if state’s schema_version is incompatible with SCHEMA_VERSION.

Only MAJOR.MINOR must match; a higher PATCH is acceptable. Logs a warning (rather than raising) when schema_version is absent entirely (pre-versioning cases).

CrocoDash.case_state.read(caseroot)#

Read _crocodash_state.json, validate the schema version, and return the state dict.

CrocoDash.case_state.write(caseroot, state)#

Write state to _crocodash_state.json, injecting schema_version as the first key.

CrocoDash.cli module#

exception CrocoDash.cli.CrocoDashCliError#

Bases: Exception

A deliberate, user-facing CLI error.

main() prints this cleanly and exits(1) instead of showing a traceback. Only raise this for conditions a user can act on (e.g. “run this other command first”) – never to blanket-catch unexpected bugs, which should keep their real traceback.

CrocoDash.cli.main()#

CrocoDash.grid module#

CrocoDash.grid_creator module#

CrocoDash.logging module#

This module (logging) contains logging functions that are used across the CrocoDash package.

CrocoDash.logging.setup_logger(name)#

This function sets up a logger format for the package. It attaches logger output to stdout (if a handler doesn’t already exist) and formats it in a pretty way!

Parameters:

name (str) – The name of the logger.

Returns:

The logger

Return type:

logging.Logger

CrocoDash.recipe module#

CrocoDash.shareable module#

CrocoDash.topo module#

CrocoDash.topo_editor module#

CrocoDash.vgrid module#

CrocoDash.vgrid_creator module#

Module contents#