Skip to content

Add check-requirements-resolve command #593

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

paradigm
Copy link
Contributor

@paradigm paradigm commented May 1, 2025

This command checks that the top-level entries in the provided requirements.txt and/or constraints.txt files resolve.

Usage:
fromager check-requirements-resolve "path/to/constraints.txt" "path/to/requirements.txt"

This command checks that the top-level entries in the provided
requirements.txt and/or constraints.txt files resolve.

Usage:
   fromager check-requirements-resolve "path/to/constraints.txt" "path/to/requirements.txt"

Signed-off-by: Daniel Thau <[email protected]>
except InvalidRequirement as err:
logger.error(f"{path}: invalid requirement {line!r}: {err}")
failure = True
continue
Copy link
Member

Choose a reason for hiding this comment

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

The bootstrap command has some code to get the requirements, including filtering out requirements that are not relevant based on the current environment markers. How likely is it that we would need to do similar filtering in the linter?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Our main aim with the lint command is to do an early and inexpensive check of what will be repeated behavior in the bootstrap command. Given that, so long as it's inexpensive, it's probably best to keep the behavior identical in this regard. I'll adjust it accordingly.

@dhellmann
Copy link
Member

We talked about this offline, and I think you said you were going to merge the feature into the existing linter. Am I remembering that correctly, or should we merge this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants