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.

ExternalCodeBase#

class cstar.base.external_codebase.ExternalCodeBase(source_repo: str | None = None, checkout_target: str | None = None)#

Bases: ABC, LoggingMixin

Abstract base class to manage external non-python dependencies of C-Star.

source#

Information about the external codebase source repository

Type:

SourceData:

root_env_var#

Environment variable pointing to the root of the external codebase

Type:

str

working_copy#

Local clone of the codebase

Type:

StagedRepository

is_configured#

True if the codebase has been retrieved and configured locally

Type:

bool

get(target_dir: Path) StagedRepository:#

Clone the codebase locally at the intended checkout target. Updates working_copy

configure():

Perform any actions necessary to configure this codebase locally for use

setup(target_dir: Path):

Calls both get() and configure() in sequence

Methods

ExternalCodeBase.configure()

Configure (set environment, compile, etc.) the external codebase on your local machine.

ExternalCodeBase.get([target_dir])

Retrieve and stage this ExternalCodeBase

ExternalCodeBase.setup([target_dir])

Retrieve and configure this codebase in a single call

ExternalCodeBase.to_dict()

Return this ExternalCodeBase as a dictionary of kwargs to ExternalCodeBase.__init__

Attributes

ExternalCodeBase.is_configured

Returns True if this ExternalCodeBase exists locally and is correctly configured

ExternalCodeBase.key

Return a string that uniquely identifies ExternalCodeBase subclasses.

ExternalCodeBase.log

Return the logger instance for this class.

ExternalCodeBase.root_env_var

Environment variable pointing to the location of the codebase when configured, e.g. MARBL_ROOT.

ExternalCodeBase.source

The SourceData instance associated with this ExternalCodeBase

ExternalCodeBase.working_copy

StagedRepository instance describing the local clone of this codebase (if it exists)