def clean(self, project, prepare_result): """Blow away auto-provided state for the project. This should not remove any potential "user data" such as anaconda-project-local.yml. Args: project (Project): the project instance prepare_result (PrepareResult): result of a previous prepare Returns: a ``Status`` instance """ return project_ops.clean(project=project, prepare_result=prepare_result)
def clean_command(project_dir): """Clean up generated state. Returns: exit code """ project = load_project(project_dir) result = prepare_without_interaction(project, mode=PROVIDE_MODE_CHECK) status = project_ops.clean(project, result) if status: print(status.status_description) return 0 else: console_utils.print_status_errors(status) return 1
def clean_command(project_dir): """Clean up generated state. Returns: exit code """ project = load_project(project_dir) # we don't want to print errors during this prepare, clean # can proceed even though the prepare fails. with project.null_frontend(): result = prepare_without_interaction(project, mode=PROVIDE_MODE_CHECK) status = project_ops.clean(project, result) if status: print(status.status_description) return 0 else: console_utils.print_status_errors(status) return 1