Example #1
0
def update(project_dir, env_spec_name):
    """Update dependency versions."""
    project = load_project(project_dir)
    if console_utils.print_project_problems(project):
        return 1
    status = project_ops.update(project, env_spec_name=env_spec_name)
    return _handle_status(status)
Example #2
0
    def update(self, project, env_spec_name):
        """Attempt to update frozen dependency versions in anaconda-project-lock.yml.

        If the env_spec_name is None rather than a name,
        all env specs are updated.

        If an env is not locked, this updates the installed dependencies but
        doesn't change anything about project configuration (does not save
        the lock file).

        Args:
            project (Project): the project
            env_spec_name (str): environment spec name or None for all environment specs

        Returns:
            ``Status`` instance
        """
        return project_ops.update(project=project, env_spec_name=env_spec_name)