Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Let conda-lock produce both unified and platform-specific lockfiles #123

Merged
merged 3 commits into from
Aug 7, 2024

Conversation

weiji14
Copy link
Member

@weiji14 weiji14 commented Aug 6, 2024

Running conda-lock lock --kind=lock to produce a unified 'conda-lock.yml' file, and then conda-lock render to get a platform-specific 'conda-linux-64.lock' file as before.

Fixes #122.

Passing `--kind=lock` flag to produce unified 'conda-lock.yml' file, in addition to the current 'conda-linux-64.lock' file.
@weiji14 weiji14 self-assigned this Aug 6, 2024
Copy link

github-actions bot commented Aug 6, 2024

Binder 👈 Test this PR on Binder

- name: Run conda-lock
run: |
conda-lock lock --mamba --kind explicit --file environment.yml --platform linux-64
conda-lock lock --mamba --kind lock --kind explicit --file environment.yml --platform linux-64
Copy link
Member Author

@weiji14 weiji14 Aug 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@scottyhq, at #122 (comment), you said to use:

conda-lock lock -p linux-64
conda-lock render -k explicit -p linux-64

What's the difference between the lock and render subcommands? Is render just converting an existing 'conda-lock.yml' file to 'conda-linux-64.lock' (and thus preventing differences in versions between the two lockfiles)?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep! that's my understanding. basically conda-lock.yml is the single source of truth that you should be able to render different formats for various tools: https://conda.github.io/conda-lock/output/

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, have split it into two separate lock and render commands. Will need to merge this into main branch first and then ask the bot to generate the lockfiles in a follow-up PR.

Separate the two steps so that the unified lockfile is the source that is used to produce the platform-specific lockfiles later.
@weiji14 weiji14 marked this pull request as ready for review August 6, 2024 23:27
@weiji14 weiji14 requested a review from scottyhq August 7, 2024 04:28
@scottyhq scottyhq merged commit 1ef4863 into main Aug 7, 2024
@scottyhq scottyhq deleted the unified-conda-lock-file branch August 7, 2024 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Commit conda-lock.yml to repository
2 participants