From 0f1b3e6bb02b4100f7bb5fc22bf0f53ecaccfd37 Mon Sep 17 00:00:00 2001 From: Remco de Boer <29308176+redeboer@users.noreply.github.com> Date: Thu, 5 Sep 2024 22:10:17 +0200 Subject: [PATCH] ENH: do not create `pixi.activation` table for `env` (#390) --- src/compwa_policy/check_dev_files/pixi.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/compwa_policy/check_dev_files/pixi.py b/src/compwa_policy/check_dev_files/pixi.py index 65cc6dc9..a340992f 100644 --- a/src/compwa_policy/check_dev_files/pixi.py +++ b/src/compwa_policy/check_dev_files/pixi.py @@ -185,12 +185,9 @@ def __import_conda_environment(pyproject: ModifiablePyproject) -> None: conda_variables = {k: str(v) for k, v in conda.get("variables", {}).items()} if not conda_variables: return - activation_table = pyproject.get_table("tool.pixi.activation", create=True) - pixi_variables = dict(activation_table.get("env", {})) - if not complies_with_subset(pixi_variables, conda_variables): - new_env = pixi_variables - new_env.update(conda_variables) - activation_table["env"] = new_env + env_table = pyproject.get_table("tool.pixi.activation.env", create=True) + if not complies_with_subset(env_table, conda_variables): + env_table.update(conda_variables) msg = "Imported conda environment variables for Pixi" pyproject.changelog.append(msg)