Description
openedon Sep 19, 2024
Problem description
I am excited about the new pixi project export
command, thanks @synapticarbors @abkfenris and the team for implementing it! For various reasons, I am interested specifically in the conda-environment
command (not in the conda-explicit-spec
command). In particular, because there are PyPI dependencies in my projects and because I would like the output to be easier to read and modify.
(1) Channels
I noticed that the output does not include the channel information for individual packages. It means that the environment created from the conda-environment output can be different than the original pixi environment.
Let's consider the following manifest file:
[project]
channels = ["conda-forge", "pytorch"]
name = "tmp"
platforms = ["osx-arm64"]
version = "0.1.0"
[dependencies]
python = "3.10.5"
pytorch = { version = "2.0.0", channel = "pytorch" }
The output of pixi project export conda-environment
:
name: default
channels:
- conda-forge
- pytorch
dependencies:
- python ==3.10.5
- pytorch ==2.0.0. # Should be pytorch::pytorch ==2.0.0
Now, if do micromamba env create -f environment.yaml
, the pytorch
package will be installed from conda-forge
instead of the original pytorch
channel. While this is in line with what, say, micromamba env export
does, I think it would be valuable to allow including the channel information for better reproducibility. In particular, specifically the channel::
format is interesting, because it makes the output compatible with (or more easily adjustable to) different architectures (contrary to the --channel-subdir
feature of micromamba env export
).
(2) Implicit dependencies
Currently, only the explicit dependencies are included in the output. It would be nice to allow including all dependencies to better match the original environment.
(3) nodefaults
Also, perhaps, the nodefaults
channel should be included by default if it is not presented in the original pixi project? First, for better reproducibility (as far as I understand, otherwise, conda can pull packages from the default channel). Second, generally, I am not aware of the legal details of the recent licence changes around the default channel, so I would like to ensure that I don't accidentally install something from the default channel and break any licence agreements.
P.S. Basically, (1) and (3) is what I do manually every time after I run micromamba env export
in my projects.