-
Notifications
You must be signed in to change notification settings - Fork 145
Fix processing short pip flags in environment dependencies #3708
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
Changes from 2 commits
0bf34b0
3013c11
f62f9e3
5df9ec5
fe23869
fa7327c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -91,7 +91,7 @@ func IsLocalRequirementsFile(dep string) (string, bool) { | |
| } | ||
|
|
||
| func containsPipFlag(input string) bool { | ||
| re := regexp.MustCompile(`--[a-zA-Z0-9-]+`) | ||
| re := regexp.MustCompile(`--?[a-zA-Z0-9-]+`) | ||
|
||
| return re.MatchString(input) | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -57,6 +57,7 @@ func TestIsLibraryLocal(t *testing.T) { | |
| {path: "s3://mybucket/path/to/package", expected: false}, | ||
| {path: "dbfs:/mnt/path/to/package", expected: false}, | ||
| {path: "beautifulsoup4", expected: false}, | ||
| {path: "-e some/local/path", expected: false}, | ||
|
Contributor
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. There are some more tricky cases that we should cover here :-/ AI might help identify and handle them Btw, Andrew, please consider how to incorporate such cases. It could be that what you have here is just net-better than what we have now and that we should have a followup with refinements. It could also be that we just need to revise this PR to cover things like
Contributor
Author
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. We have quite a good coverage for this overall, but I've added some additional cases for unit / acceptacne tests |
||
|
|
||
| // Check the possible version specifiers as in PEP 440 | ||
| // https://peps.python.org/pep-0440/#public-version-identifiers | ||
|
|
||
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.
This PR now also handles relative paths for
-e. We can include additional entries for the same PR, for different user-visible changes (eg call out-especifically).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.
Fixed here fa7327c