INNER CODE UNIT · Python

_read_section

wwood/singlem · admin/build_dep_defs_from_pixi.py:60

def _read_section(section):
    if isinstance(section, list):
        d = pixi_data
        for subsec in section:
            d = d.get(subsec, {})
    else:
        d = pixi_data.get(section, {})
    print(f"Found {len(d)} declared packages in section {section}.")
    return {pkg.lower() for pkg in d}

python_conda = set().union(*(_read_section(s) for s in PYTHON_SECTIONS))
nonpython_conda = set().union(*(_read_section(s) for s in NONPYTHON_SECTIONS))
mixed_conda = set().union(*(_read_section(s) for s in MIXED_SECTIONS))
declared_conda = python_conda | nonpython_conda | mixed_conda

# Prepare environment.yml data
conda_deps = [
    f"{pkg}={pixi_list[pkg]}"

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…