Skip to content

Commit

Permalink
ENH: do not create pixi.activation table for env
Browse files Browse the repository at this point in the history
  • Loading branch information
redeboer committed Sep 5, 2024
1 parent 9c5f1ec commit c54134d
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/compwa_policy/check_dev_files/pixi.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit c54134d

Please sign in to comment.