Esempio n. 1
0
    def export_env_spec(self, project, name, filename):
        """Export the environment spec as an environment.yml-type file.

        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 spec name
            filename (str): file to export to

        Returns:
            ``Status`` instance
        """
        return project_ops.export_env_spec(project=project, name=name, filename=filename)
Esempio n. 2
0
def export_env_spec(project_dir, name, filename):
    """Save an environment.yml file."""
    project = load_project(project_dir)
    status = project_ops.export_env_spec(project, name=name, filename=filename)
    return _handle_status(status)