class_docstr: ProjectController inherits from BaseController and manages business logic related to the
  project. One model is associated with each project currently.
  
  Methods
  -------
  init(name, description)
      Initialize the project repository as a new model or update the existing project
  cleanup()
      Remove all datmo references from the current repository. NOTE: THIS WILL DELETE ALL DATMO WORK
  status()
      Give the user a picture of the status of the project, snapshots, and tasks
class_docstr_tok: ["ProjectController","inherits","from","BaseController","and","manages","business","logic","related","to","the","project",".","One","model","is","associated","with","each","project","currently",".","Methods","--","--","--","-","init","(","name",",","description",")","Initialize","the","project","repository","as","a","new","model","or","update","the","existing","project","cleanup","(",")","Remove","all","datmo","references","from","the","current","repository",".","NOTE",":","THIS","WILL","DELETE","ALL","DATMO","WORK","status","(",")","Give","the","user","a","picture","of","the","status","of","the","project",",","snapshots",",","and","tasks"]
docstr: Cleans the project structure completely
  
  Notes
  -----
  This function will not error out but will gracefully exit, since
  it is used in cases where init fails as a check against mid-initialized
  projects
  
  Returns
  -------
  bool
docstr_tok: ["Cleans","the","project","structure","completely","Notes","--","--","-","This","function","will","not","error","out","but","will","gracefully","exit",",","since","it","is","used","in","cases","where","init","fails","as","a","check","against","mid-initialized","projects","Returns","--","--","--","-","bool"]
code: def cleanup(self):
      """Cleans the project structure completely
  
      Notes
      -----
      This function will not error out but will gracefully exit, since
      it is used in cases where init fails as a check against mid-initialized
      projects
  
      Returns
      -------
      bool
      """
      if not self.is_initialized:
          self.logger.warning(
              __("warn", "controller.project.cleanup.not_init")
          )
      # Remove Datmo environment_driver references, give warning if error
      try:
          # Obtain image id before cleaning up if exists
          images = self.environment_driver.list_images(
              name="datmo-" + self.model.name
          )
          image_id = images[0].id if images else None
      except Exception:
          self.logger.warning(
              __("warn", "controller.project.cleanup.environment")
          )
  
      # Remove Datmo code_driver references, give warning if error
      try:
          if self.code_driver.is_initialized:
              for ref in self.code_driver.list_refs():
                  self.code_driver.delete_ref(ref)
      except Exception:
          self.logger.warning(
              __("warn", "controller.project.cleanup.code")
          )
      try:
          # Remove Hidden Datmo file structure, give warning if error
          self.file_driver.delete_hidden_datmo_file_structure()
      except (FileIOError, PathDoesNotExist):
          self.logger.warning(
              __("warn", "controller.project.cleanup.files")
          )
  
      try:
          if image_id:
              # Remove image created during init
              self.environment_driver.remove_image(
                  image_id_or_name=image_id, force=True
              )
  
              # Remove any dangling images (optional)
  
              # Stop and remove all running environments with image_id
              self.environment_driver.stop_remove_containers_by_term(
                  image_id, force=True
              )
      except Exception:
          self.logger.warning(
              __("warn", "controller.project.cleanup.environment")
          )
  
      return True
  
file_path: datmo/datmo/core/controller/project.py
imports: import os
  from datmo.config import Config
  from datmo.core.util.validation import validate
  from datmo.core.util.i18n import get
  from datmo.core.controller.base import BaseController
  from datmo.core.controller.code.code import CodeController
  from datmo.core.controller.environment.environment import EnvironmentController
  from datmo.core.controller.file.file_collection import FileCollectionController
  from datmo.core.controller.snapshot import SnapshotController
  from datmo.core.entity.model import Model
  from datmo.core.util.json_store import JSONStore
  from datmo.core.util.exceptions import ProjectNotInitialized, EnvironmentConnectFailed, FileIOError, UnstagedChanges, PathDoesNotExist
label_desc: Use image node_id 3 for calling the ProjectController obj's underlying member method code with example usage: obj.cleanup() and returns: True