update
The implementation of the update command.
Classes¶
Functions¶
update_cmd
¶
update_cmd(
project_dir: Optional[Path] = None,
no_input: bool = False,
) -> None
Update the project with the latest versions of each layer.
Parameters:
project_dir
-
The project directory to update. Defaults to current directory.
DEFAULT:
None
no_input
-
If
True
force each layer’sno_input
attribute toTrue
TYPE:
bool
DEFAULT:
False
Raises:
-
GitError
-
If the destination_dir is not a git repository
-
ValueError
-
If there is not a .composition.yaml file in the destination directory
update_rendered_composition_layers
¶
update_rendered_composition_layers(
base: RenderedComposition,
updated_layers: List[RenderedLayer],
) -> RenderedComposition
Update base.layers
with updated_layers
where layer names match.
If, for some reason, a layer exists in updated_layers
but not in base
, it is discarded.
Parameters:
base
-
The base composition whose layers are to be updated
TYPE:
RenderedComposition
updated_layers
-
The new rendered layers
TYPE:
List[RenderedLayer]
Raises:
-
RuntimeError
-
If a layer’s location
render_dir
properties don’t match -
RuntimeError
-
If the compositions’
rendered_name
properties don’t match
Returns:
-
RenderedComposition
-
A new composition with updated layers