AdditionalCode

Contents

Attention

This project is still in an early phase of development.

The python API is not yet stable, and some aspects of the schema for the blueprint and workplan will likely evolve. Therefore whilst you are welcome to try out using the package, we cannot yet guarantee backwards compatibility. We expect to reach a more stable version in 2026.

AdditionalCode#

class cstar.base.additional_code.AdditionalCode(location: str, subdir: str = '', checkout_target: str = '', files: Iterable[str] = ())#

Bases: LoggingMixin

Additional code contributing to a model simulation.

Additional code is assumed to be kept in a single directory or subdirectory of a repository (described by the source attribute).

Attributes:#

source: SourceData

Describes the location of and classifies the source data

working_copy: Path, default None

The local path to the additional code. Set when get() method is called.

exists_locally: bool

True if this AdditionalCode has been staged for use locally

Methods:#

get(local_dir):

Stage this InputDataset for local use by C-Star

Methods

AdditionalCode.get(local_dir)

Stage the AdditionalCode files to local_dir

AdditionalCode.to_dict()

Attributes

AdditionalCode.exists_locally

Determine whether an unmodified local working copy of the AdditionalCode is available

AdditionalCode.log

Return the logger instance for this class.

AdditionalCode.working_copy

The staged, local version of this AdditionalCode (if available).

AdditionalCode.files