def __init__(self, config_file: str = None) -> None: """Constructor Args: config_file(str): Optional config file location if don't want to load from default location """ self.config = Configuration(config_file=config_file) self.local_repo_directory = os.path.expanduser( os.path.join(self.config.config["git"]['working_directory'], ".labmanager", "environment_repositories")) self.git = get_git_interface(self.config.config['git'])
def __init__(self, config_file: Optional[str] = None, author: Optional[GitAuthor] = None) -> None: self.client_config = Configuration(config_file) # Create gitlib instance self.git = get_git_interface(self.client_config.config["git"]) # If author is set, update git interface if author: self.author = author # Repository Properties self._root_dir: Optional[str] = None # The root dir is the location of the labbook this instance represents self._data: Dict[str, Any] = {} self._checkout_id: Optional[str] = None # Redis instance for the LabBook lock self._lock_redis_client: Optional[StrictRedis] = None # Persisted Favorites data for more efficient file listing operations self._favorite_keys: Optional[Dict[str, Any]] = None