Ballistica Logo

batools.project package

Module contents

Functionality for updating/checking the project

class batools.project.ProjectUpdater(projroot: str, *, check: bool, fix: bool, empty: bool = False, projname: str = 'BallisticaKit')[source]

Bases: object

Context for an project-updater run.

add_line_correction(filename: str, line_number: int, expected: str, can_auto_update: bool) None[source]

Add a correction that the updater can optionally perform.

enqueue_update(path: str, data: str | None = None) None[source]

Add an update to the queue.

property feature_sets: dict[str, FeatureSet]

Cached list of project feature-sets.

generate_file(path: str) str[source]

Generate/return the contents for the file at the given path.

property header_files: list[str]

Return project header files.

prepare_to_generate() None[source]

Prepare

run() None[source]

Do the thing.

property source_files: list[str]

Return project source files.

batools.project.project_centric_path(projroot: str, path: str) str[source]

Convert a CWD-relative path to a project-relative one.