-
Notifications
You must be signed in to change notification settings - Fork 40
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
feat: python plugin file listing #943
Merged
mr-cal
merged 23 commits into
feature/origin-tagging
from
work/CRAFT-3758-origin-tagging-for-python-plugin
Dec 20, 2024
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
18deeb0
feat: add plugin code from prototype with signature from npm PR
mattculler 9926a0d
feat: make it work
mattculler 9a53d08
fix: make paths correct and compact
mattculler e967b15
chore: autoformat
mattculler 62c034c
fix: accidentally committed change to sortableize Package, let it ride
mattculler befec8f
feat: add unit test
mattculler deca1a2
fix: name of tested function changed
mattculler d24a5a3
feat: add integration test
mattculler 684729c
fix: test failed on CI due to differing pip versions
mattculler be6ec70
fix: test depended on pathlib changes from 3.12, rewrote for 3.10
mattculler 5db00b1
fix: flask has a different number of files on py3.10
mattculler e17057b
fix: py3.10 installs a different number of packages - adds setuptools
mattculler 6a8e8ce
chore: code review changes
mattculler 344dc5a
fix: code review: make test not break when flask's dependencies update
mattculler a3e158f
chore: code review: rewrite test to be more explicit
mattculler 1528104
chore: code review: ensure plugin file listing is stateless
mattculler 7968c83
fix: remove now-unnecessary check
mattculler a23b436
chore: refactor test to put file tree on the FS
mattculler 737c0ca
fix: remove indirect dependency and reliance on specific versions
mattculler 5fbace5
Update tests/integration/plugins/test_python.py
mattculler e2bbdfd
Update tests/integration/plugins/test_python.py
mattculler a68e014
fix: can't rely on package version so can't expect a certain number o…
mattculler 031cf84
chore: autoformat
mattculler 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
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
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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/sh | ||
echo it is done |
1 change: 1 addition & 0 deletions
1
...tfiles/python/install/lib/python/site-packages/fakeee-1.2.3-deb_ian.dist-info/LICENSE.txt
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
This software is covered by the fake license. The terms of this license do not apply to the software. |
2 changes: 2 additions & 0 deletions
2
...testfiles/python/install/lib/python/site-packages/fakeee-1.2.3-deb_ian.dist-info/METADATA
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Name: fakeee | ||
Version: 1.2.3-deb_ian |
8 changes: 8 additions & 0 deletions
8
...s/testfiles/python/install/lib/python/site-packages/fakeee-1.2.3-deb_ian.dist-info/RECORD
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
../../../bin/doit,, | ||
fakeee/a_file.py,, | ||
fakeee/things/stuff.py,, | ||
fakeee/things/nothing.py,, | ||
fakeee-1.2.3-deb_ian.dist-info/LICENSE.txt,, | ||
fakeee-1.2.3-deb_ian.dist-info/METADATA,, | ||
fakeee-1.2.3-deb_ian.dist-info/RECORD,, | ||
fakeee-1.2.3-deb_ian.dist-info/REQUESTED,, |
Empty file.
2 changes: 2 additions & 0 deletions
2
tests/unit/plugins/testfiles/python/install/lib/python/site-packages/fakeee/a_file.py
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
def func(): | ||
return True |
2 changes: 2 additions & 0 deletions
2
...s/unit/plugins/testfiles/python/install/lib/python/site-packages/fakeee/things/nothing.py
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
def lying_function(): | ||
return "lying_function was not executed" |
2 changes: 2 additions & 0 deletions
2
tests/unit/plugins/testfiles/python/install/lib/python/site-packages/fakeee/things/stuff.py
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
def dontdoit(a): | ||
print(f"Not done: {a}") |
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.
I'll bet we can put this in the base Python plugin. In all three cases they generate PEP 405 compatible virtual environments in
self._get_venv_directory()
. (I'm fine if you don't do so in this PR, but when we get to the point of implementing it for poetry and uv it probably comes roughly for free)