|  |  | @ -42,11 +42,12 @@ class Project(YamlSerializable): | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     @property |  |  |  |     @property | 
			
		
	
		
		
			
				
					
					|  |  |  |     def absulute_path(self): |  |  |  |     def absulute_path(self): | 
			
		
	
		
		
			
				
					
					|  |  |  |         if not hasattr(self, 'production_path') or not self.relative_production_path: |  |  |  |         if not hasattr(self, 'relative_production_path') or not self.relative_production_path: | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |             return None |  |  |  |             return None | 
			
		
	
		
		
			
				
					
					|  |  |  |         return Path(config['production_path'].get()) / self.relative_production_path |  |  |  |         return Path(config['production_path'].get()) / self.relative_production_path | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     def update(self): |  |  |  |     def update(self): | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         """Update project's local repoistory""" | 
			
		
	
		
		
			
				
					
					|  |  |  |         # pylint: disable=no-member |  |  |  |         # pylint: disable=no-member | 
			
		
	
		
		
			
				
					
					|  |  |  |         self._make_sure_production_path_exists() |  |  |  |         self._make_sure_production_path_exists() | 
			
		
	
		
		
			
				
					
					|  |  |  |         path = self.absulute_path |  |  |  |         path = self.absulute_path | 
			
		
	
	
		
		
			
				
					|  |  | @ -77,16 +78,24 @@ class Project(YamlSerializable): | 
			
		
	
		
		
			
				
					
					|  |  |  |         return None |  |  |  |         return None | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     def delete_files(self): |  |  |  |     def delete_files(self): | 
			
		
	
		
		
			
				
					
					|  |  |  |         self._make_sure_production_path_exists() |  |  |  |         if self._production_path_exists(): | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         path = self.absulute_path |  |  |  |             path = self.absulute_path | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         app.logger.info(f"Deleting {path}") |  |  |  |             app.logger.info(f"Deleting {path}") | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         rmtree(path) |  |  |  |             rmtree(path) | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         self.relative_production_path = None |  |  |  |         self.relative_production_path = None | 
			
		
	
		
		
			
				
					
					|  |  |  |         self.save() |  |  |  |         self.save() | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     def _production_path_exists(self): | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         """Return True if project's the production directory path exists""" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         prod_path_dir = Path(config['production_path'].get()) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         if hasattr(self, 'relative_production_path') and self.relative_production_path: | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             full_path = prod_path_dir / self.relative_production_path | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             return full_path.is_dir() | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         return False | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     def _make_sure_production_path_exists(self): |  |  |  |     def _make_sure_production_path_exists(self): | 
			
		
	
		
		
			
				
					
					|  |  |  |         prod_path_dir = Path(config['production_path'].get()) |  |  |  |         prod_path_dir = Path(config['production_path'].get()) | 
			
		
	
		
		
			
				
					
					|  |  |  |         if hasattr(self, 'production_path') and self.relative_production_path: |  |  |  |         if hasattr(self, 'relative_production_path') and self.relative_production_path: | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |             full_path = prod_path_dir / self.relative_production_path |  |  |  |             full_path = prod_path_dir / self.relative_production_path | 
			
		
	
		
		
			
				
					
					|  |  |  |             if not full_path.is_dir(): |  |  |  |             if not full_path.is_dir(): | 
			
		
	
		
		
			
				
					
					|  |  |  |                 full_path.mkdir(parents=True) |  |  |  |                 full_path.mkdir(parents=True) | 
			
		
	
	
		
		
			
				
					|  |  | 
 |