()
Combine all dependencies for the Agent's static environment.
Combine all dependencies for the Agent's static environment.
Combine all dependencies for the Agent s static environment .
def freeze():
    """Combine all dependencies for the Agent's static environment."""
    dependencies, errors = read_check_dependencies()

    if errors:
        for error in errors:
            echo_failure(error)

        abort()

    static_file = get_agent_requirements()

    echo_info(f'Static file: {static_file}')

    data = sorted(
        (
            (dependency_definition.name, str(dependency_definition.requirement).lower())
            for versions in dependencies.values()
            for dependency_definitions in versions.values()
            for dependency_definition in dependency_definitions
        ),
        key=lambda d: d[0],
    )
    lines = sorted(set(f'{d[1]}\n' for d in data))

    write_file_lines(static_file, lines)
def freeze ( ) : dependencies , errors = read_check_dependencies ( ) if errors : for error in errors : echo_failure ( error ) abort ( ) static_file = get_agent_requirements ( ) echo_info ( f'Static file: {static_file}' ) data = sorted ( ( ( dependency_definition . name , str ( dependency_definition . requirement ) . lower ( ) ) for versions in dependencies . values ( ) for dependency_definitions in versions . values ( ) for dependency_definition in dependency_definitions ) , key = lambda d : d [ 0 ] , ) lines = sorted ( set ( f'{d[1]}\n' for d in data ) ) write_file_lines ( static_file , lines )