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

Add a command for validating lockfile validity/freshness #1459

Closed
tgolsson opened this issue Oct 24, 2022 · 1 comment · Fixed by #1460
Closed

Add a command for validating lockfile validity/freshness #1459

tgolsson opened this issue Oct 24, 2022 · 1 comment · Fixed by #1460
Labels
⭐ enhancement Improvements for existing features

Comments

@tgolsson
Copy link
Contributor

Is your feature request related to a problem? Please describe.

I would like a cheap way of verifying that my lockfile is up to date, for example for CI usage.

Describe the solution you'd like

While developing a plugin for version management of torch binaries I found this function:

pdm/src/pdm/cli/actions.py

Lines 155 to 156 in 7877f73

def check_lockfile(project: Project, raise_not_exist: bool = True) -> str | None:
"""Check if the lock file exists and is up to date. Return the update strategy."""

That seems like it would be very helpful if it was exposed either as a new command (pdm validate-lockfile?) or as pdm lock --check.

I can contribute whichever variant you'd prefer - hence why I'm opening this to get a feeler for preferences.

@tgolsson tgolsson added the ⭐ enhancement Improvements for existing features label Oct 24, 2022
@frostming
Copy link
Collaborator

I'd vote for pdm lock --check(in fact, there is pdm install --check), PR welcome

@frostming frostming linked a pull request Oct 25, 2022 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⭐ enhancement Improvements for existing features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants