autosubmit.git#
- autosubmit.git.autosubmit_git.check_unpushed_changes(expid: str, as_conf: AutosubmitConfig) None#
Check if the Git repository is dirty for an operational experiment.
Raises an AutosubmitCritical error if the experiment is operational, the platform is Git, and there are unpushed changes in the local Git repository, or in any of its Git submodules.
- Parameters:
expid – The experiment ID.
as_conf – Autosubmit configuration object.
- autosubmit.git.autosubmit_git.clean_git(as_conf: AutosubmitConfig) bool#
Clean the cloned Git repository inside the project directory of the experiment.
Skipped if the project directory location is not a valid directory.
Skipped if the project directory is not a valid Git repository.
Skipped if there are changes in the Git repository that were not committed or not pushed.
- Parameters:
as_conf – experiment configuration
- Returns:
Trueif the Git project directory was successfully deleted,Falseotherwise.
- autosubmit.git.autosubmit_git.clone_repository(as_conf: AutosubmitConfig, force: bool) bool#
Clone the configured Git repository into the project folder.
If the platform defined in the Autosubmit configuration is invalid, the local platform is used instead and remote Git cloning is disabled.
- Parameters:
as_conf – Autosubmit configuration.
force – Overwrite files when cloning if
True.
- Returns:
Trueif the repository was cloned successfully,Falseotherwise.- Raises:
AutosubmitCritical – If: - Loading the Autosubmit platforms fails. - The configured platform is invalid. - The Git configuration is invalid. - Cloning the Git repository fails.