Repository navigation
Fix for git subdirectories #5172
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
3f05017
Add test for parsing dependency specification
ashnair1 7a77654
Add tests for git urls with subdirectory
ashnair1 fe6e484
Add subdirectory reference to locker.py
ashnair1 706ef49
Add subdirectory refs to pip installer
ashnair1 3921a57
Add subdirectory refs to installed_repository
ashnair1 0d43406
Add support for subdirectories in git urls
ashnair1 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Empty file.
18 changes: 18 additions & 0 deletions
18
tests/fixtures/git/github.com/demo/poetry-plugin2/subdir/pyproject.toml
This file contains hidden or 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,18 @@ | ||
| [tool.poetry] | ||
| name = "poetry-plugin" | ||
| version = "0.1.2" | ||
| description = "Some description." | ||
| authors = [ | ||
| "Sébastien Eustace <sebastien@eustace.io>" | ||
| ] | ||
| license = "MIT" | ||
|
|
||
| [tool.poetry.dependencies] | ||
| python = "^3.6" | ||
| pendulum = "^2.0" | ||
| tomlkit = {version = "^0.7.0", optional = true} | ||
|
|
||
| [tool.poetry.extras] | ||
| foo = ["tomlkit"] | ||
|
|
||
| [tool.poetry.dev-dependencies] |
Empty file.
This file contains hidden or 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
Empty file.
This file contains hidden or 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 hidden or 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
Empty file.
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -553,6 +553,40 @@ def test_executor_should_write_pep610_url_references_for_git( | |
| ) | ||
|
|
||
|
|
||
| def test_executor_should_write_pep610_url_references_for_git_with_subdirectories( | ||
| tmp_venv: VirtualEnv, | ||
| pool: Pool, | ||
| config: Config, | ||
| io: BufferedIO, | ||
| mock_file_downloads: None, | ||
| ): | ||
| package = Package( | ||
|
Member
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. Let's go ahead and hoist this out into a fixture. I'm not sure if there's a clean place to put it, but also please check if we can share this with |
||
| "two", | ||
| "2.0.0", | ||
| source_type="git", | ||
| source_reference="master", | ||
| source_resolved_reference="123456", | ||
| source_url="https://github.com/demo/subdirectories.git", | ||
| source_subdirectory="two", | ||
| ) | ||
|
|
||
| executor = Executor(tmp_venv, pool, config, io) | ||
| executor.execute([Install(package)]) | ||
| verify_installed_distribution( | ||
| tmp_venv, | ||
| package, | ||
| { | ||
| "vcs_info": { | ||
| "vcs": "git", | ||
| "requested_revision": "master", | ||
| "commit_id": "123456", | ||
| }, | ||
| "url": package.source_url, | ||
| "subdirectory": package.source_subdirectory, | ||
| }, | ||
| ) | ||
|
|
||
|
|
||
| def test_executor_should_use_cached_link_and_hash( | ||
| tmp_venv: VirtualEnv, | ||
| pool: Pool, | ||
|
|
||
This file contains hidden or 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
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.
Uh oh!
There was an error while loading. Please reload this page.