Closed AlbertDeFusco closed 4 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 98.23%. Comparing base (
8aab898
) to head (1dabb92
). Report is 5 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
LGTM
In this PR
conda-project init --from-environment <name or prefix>
conda-project install
only re-lock if the current platform needs to be re-lockedUsing the
--from-environment <name or prefix path>
flag theenvironment.yml
andconda-lock.<env-name>yml
files will be generated from an existing conda environment.The
conda-lock.<env-name>.yml
for the current platform is constructed by performing a fullconda env export
so that the environment is captured as-is into the lockfile. Only packages for the current platform are written in to the lock. When someone attempts to install on another platform conda-project will automatically lock the missing platforms, but not modify the original platform, unless the environment.yml file was changed.The environment.yml captures the requested conda and pip packages as follows. You'll see that conda packages are prefixed with its channel and the full version is captured in the spec even if a specific version was not originally requested. This helps keep the environment close to the original if the original platform is re-locked and when other platforms are locked.
You'll see that all four major platforms are listed in the environment.yml, but a full cross-platform solve is not attempted by default. The user could do
conda project init --from-environment <env-or-path> --lock
, which will capture the current platform according to the above procedure and then lock the remaining platforms.