autosubmit.git#

class autosubmit.git.autosubmit_git.AutosubmitGit#

Class to handle experiment git repository.

static clone_repository(as_conf, force, hpcarch)#

Clones a specified git repository on the project folder

Parameters:
  • as_conf (autosubmit.config.AutosubmitConfig) – experiment configuration

  • force (bool) – if True, it will overwrite any existing clone

  • hpcarch – current main platform

Returns:

True if clone was successful, False otherwise

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:

True if the Git project directory was successfully deleted, False otherwise.