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

Refactor lock command and fix an edge case #695

Merged
merged 10 commits into from
Sep 13, 2024

Conversation

maresb
Copy link
Contributor

@maresb maresb commented Sep 13, 2024

Description

Before, when no lockfile was found by conda-lock render it would print the help and exit. Now it also prints a helpful error message that no lockfile was found.

Before, when no source files were found by conda-lock lock it would print the help and exit. Now it also prints a helpful error message that no source files were provided.

For the case when no source files are specified, the logic to reconstruct the environment files from a lockfile has been split into a helper function.

Several type hints for the Click function lock were incorrect, so these have been corrected. Some corresponding minor adjustments were also made to appease mypy.

Omitted CLI parameters are handled more explicitly for the lockfile path and source paths. In particular, we better distinguish the cases "no value provided" and "default value provided".

Related to the previous point, we now correctly handle the case of using CLI parameters to override the source files defined in a lockfile when the override coincides with the default value and consolidate the code for handling empty source files.

@maresb maresb requested a review from a team as a code owner September 13, 2024 07:41
Copy link

netlify bot commented Sep 13, 2024

Deploy Preview for conda-lock ready!

Name Link
🔨 Latest commit 69a9820
🔍 Latest deploy log https://app.netlify.com/sites/conda-lock/deploys/66e4466e094ccb00086e1f13
😎 Deploy Preview https://deploy-preview-695--conda-lock.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@maresb maresb changed the title Refactor lock command Refactor lock command and fix an edge case Sep 13, 2024
@maresb maresb merged commit cae2e2c into conda:main Sep 13, 2024
40 checks passed
@maresb maresb deleted the refactor-lock-command branch September 13, 2024 14:15
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.

1 participant