def new_repo(sender, **kwargs): if kwargs.get('raw'): # Ignore signal handling for fixture loading return instance = kwargs['instance'] created = kwargs.get('created', False) # Check if the experiment is newly created and that we can start it independently if not created: return # Check that the user has a dir if not os.path.isdir(instance.user_path): create_path(instance.user_path) # Check that the project has a dir if not os.path.isdir(instance.project_path): create_path(instance.project_path) # Create a new repo git.get_git_repo(repo_path=instance.path, init=True)
def git(self): return git.get_git_repo(repo_path=self.path)