def remove_variables(project_dir, vars_to_remove): """Remove env variable requirements from the project file. Returns: Returns exit code """ project = load_project(project_dir) status = project_ops.remove_variables(project, vars_to_remove) if status: return 0 else: console_utils.print_status_errors(status) return 1
def remove_variables(self, project, vars_to_remove, env_spec_name=None): """Remove variables from anaconda-project.yml and unset their values in local project state. Returns a ``Status`` instance which evaluates to True on success and has an ``errors`` property (with a list of error strings) on failure. Args: project (Project): the project vars_to_remove (list of tuple): key-value pairs env_spec_name (str): name of env spec to use Returns: ``Status`` instance """ return project_ops.remove_variables(project=project, vars_to_remove=vars_to_remove, env_spec_name=env_spec_name)
def remove_variables(self, project, env_spec_name, vars_to_remove, prepare_result=None): """Remove variables from anaconda-project.yml and unset their values in local project state. Returns a ``Status`` instance which evaluates to True on success and has an ``errors`` property (with a list of error strings) on failure. Args: project (Project): the project env_spec_name (str): environment spec name or None for all environment specs vars_to_remove (list of tuple): key-value pairs prepare_result (PrepareResult): result of a previous prepare or None Returns: ``Status`` instance """ return project_ops.remove_variables( project=project, env_spec_name=env_spec_name, vars_to_remove=vars_to_remove, prepare_result=prepare_result)