Exemple #1
0
    def remove_env_spec(self, project, name):
        """Remove the environment spec from project directory and remove from anaconda-project.yml.

        Returns a ``Status`` subtype (it won't be a
        ``RequirementStatus`` as with some other functions, just a
        plain status).

        Args:
            project (Project): the project
            name (str): environment name

        Returns:
            ``Status`` instance
        """
        return project_ops.remove_env_spec(project=project, name=name)
Exemple #2
0
def remove_env_spec(project_dir, name):
    """Remove an environment with packages from the project."""
    project = load_project(project_dir)
    status = project_ops.remove_env_spec(project, name=name)
    return _handle_status(status, "Removed environment {} from the project file.".format(name))