Is your feature request related to a problem? Please describe.
Pinning environments in Snakemake is annoying since pixi's naming convention does not mach snakemake's.
We could automate this through tasks.
Describe the solution you'd like
[tasks.export-conda-spec]
description = "Export one Pixi environment/platform as a conda explicit spec"
args = ["env", "platform"]
cmd = "pixi workspace export conda-explicit-spec --environment '{{ env }}' --platform '{{ platform }}' workflow/envs/"
[tasks.rename-conda-spec]
description = "Rename one Pixi conda explicit spec to a Snakemake pin file"
args = ["env", "platform"]
cmd = "mv workflow/envs/{{ env }}_{{ platform }}_conda_spec.txt workflow/envs/{{ env }}.{{ platform }}.pin.txt"
[tasks.export-snakemake-pin]
description = "Export one Pixi environment/platform as a Snakemake-compatible conda pin file"
args = ["env", "platform"]
depends-on = [
{ task = "export-conda-spec", args = ["{{ env }}", "{{ platform }}"] },
{ task = "rename-conda-spec", args = ["{{ env }}", "{{ platform }}"] },
]
[tasks.export-snakemake-env]
description = "Export one Pixi environment as a conda environment YAML"
args = ["env"]
depends-on = [
{ task = "export-snakemake-pin", args = ["{{ env }}", "win-64"] },
{ task = "export-snakemake-pin", args = ["{{ env }}", "linux-64"] },
{ task = "export-snakemake-pin", args = ["{{ env }}", "osx-arm64"] },
]
cmd = "pixi workspace export conda-environment --environment '{{ env }}' workflow/envs/{{ env }}.yaml"
Describe alternatives you've considered
Waiting until snakemake finally implements pixi?
Is your feature request related to a problem? Please describe.
Pinning environments in Snakemake is annoying since
pixi's naming convention does not machsnakemake's.We could automate this through tasks.
Describe the solution you'd like
Describe alternatives you've considered
Waiting until snakemake finally implements
pixi?