-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Support uv compiled requirements files #10040
Open
avilaton
wants to merge
17
commits into
dependabot:main
Choose a base branch
from
avilaton:patch-1
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
3a82e1d
Support python uv as pip-compile compatible replacement
avilaton 5a9eb3f
Update requirements.txt
avilaton 4d67cb2
Update python/helpers/requirements.txt
avilaton c4fba47
Update python/spec/fixtures/requirements/pip_compile_uv_header.txt
avilaton cd7beaf
Bump uv. New uv_pip_compile_options_from_compiled_file method and big…
albertferras-vrf 8338b77
Update python/helpers/requirements.txt
avilaton afa5d74
Update python/lib/dependabot/python/file_updater/pip_compile_file_upd…
avilaton 2edf6b2
Update python/lib/dependabot/python/file_updater/pip_compile_file_upd…
avilaton 1c081bf
Rename uv_pip_compile_file_updater_spec.rb to pip_compile_file_update…
avilaton 7965aeb
Update python/lib/dependabot/python/file_updater/pip_compile_file_upd…
avilaton c9d1c92
Update python/lib/dependabot/python/file_updater/pip_compile_file_upd…
avilaton cbc1e12
Update python/lib/dependabot/python/file_updater/pip_compile_file_upd…
avilaton 55a1a26
Update python/helpers/requirements.txt
avilaton 88fb54b
Update python/lib/dependabot/python/update_checker/pip_compile_versio…
avilaton 39cc41e
Update pip_compile_version_resolver.rb
avilaton fc2e796
Add missing functions
avilaton ef18227
Remove legacy pip stuff I don't mean to mess with
avilaton File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Update pip_compile_version_resolver.rb
- Loading branch information
commit 39cc41ea1a47dd9d177bec4e8f5524a0981b66e2
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -251,10 +251,14 @@ def pip_compile_options(filename) | |
options << "--output-file=#{requirements_file.name}" | ||
end | ||
|
||
command = "pyenv exec pip-compile" | ||
if (requirements_file = compiled_file_for_filename(filename)) && | ||
requirements_file.content.include?("uv pip compile") | ||
command = "pyenv exec uv pip compile" | ||
if (requirements_file = compiled_file_for_filename(filename)) | ||
if requirements_file.content.include?("uv pip compile") | ||
options += uv_pip_compile_options_from_compiled_file(requirements_file) | ||
command = "pyenv exec uv pip compile" | ||
else | ||
options += pip_compile_options_from_compiled_file(requirements_file) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @avilaton , same as above |
||
command = "pyenv exec pip-compile" | ||
end | ||
end | ||
|
||
[options.join(" "), command] | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @avilaton , looks like you added 2 new functions
uv_pip_compile_options_from_compiled_file
,pip_compile_options_from_compiled_file
inpip_compile_version_resolver.rb
, i think they are being referenced frompip_compile_file_updater.rb
can you please fix this (IDE is showing it as no function exists inDependabot::Python::UpdateChecker::PipCompileVersionResolver
)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be neat to have a way not to repeat this code, it seems to me as if it would be more resilient to have them centralized. What do you suggest we should do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@avilaton , if you think we might benefit from moving them to new location/class and see a additional functionality that could be used across. please do so.