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.

SourceData#

class cstar.io.source_data.SourceData(location: str | Path, identifier: str | None = None)#

Bases: object

Class for obtaining information about and acting on a source of data

location#

The location of the data source

Type:

str

basename#

The basename of ‘location’, e.g. a filename

Type:

str

identifier#

The identifier of the data, e.g. commit hash or checksum

Type:

str

checkout_target#

Equivalent to ‘identifier’ if source is a repository

Type:

str or None

checkout hash

The hash associated with ‘checkout_target’, if source is a repository

Type:

str or None

file_hash#

Equivalent to ‘identifier’ if source is a file

Type:

str or None

stager#

The Stager subclass with which to handle staging of this data

Type:

Stager

stage(target_dir: str | Path) StagedData#

stages the data, making it available to C-Star

Methods

SourceData.stage(target_dir)

Stages the data, making it available to C-Star

Attributes

SourceData.basename

The basename of 'location', e.g. a filename.

SourceData.checkout_hash

Equivalent to 'identifier' if source is a repository

SourceData.checkout_target

Equivalent to 'identifier' if source is a repository

SourceData.classification

The classification of the data source.

SourceData.file_hash

Equivalent to 'identifier' if source is a file

SourceData.identifier

The identifier of the data, e.g. commit hash or checksum.

SourceData.location

The location of the data source

SourceData.retriever

The retriever instance used to fetch data.

SourceData.stager

The Stager subclass with which to handle staging of this data