Skip to content
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 for file dependencies with subdirectories #467

Merged
merged 1 commit into from
May 8, 2023

Conversation

radoering
Copy link
Member

follow up of #398 to support local zip files in addition to urls

  • Added tests for changed code.
  • Updated documentation for changed code.

Some pitfalls:

  • File dependency and directory dependency share the same key (path) in pyproject.toml. Although there is no added value in having a directory dependency with a subdirectory, it will be valid according to the schema. Internally path = "folder/sub" and path = "folder", subdirectory = "sub" are not distinguished, path and subdirectory are just joined.
  • poetry add will probably only be able to add a file dependency with a subdirectory via URI, e.g. file:///tmp/file.zip#subdirectory=sub because #subdirectory=sub can't be added to a path.
  • It's possible to define a relative file dependency with a subdirectory in pyproject.toml. However, it will not be possible to add it via poetry add because there seems to be no valid URI representation for relative paths (or at least we don't support any).

@radoering radoering force-pushed the zip-subdir-file-dependency branch 2 times, most recently from 19740f4 to 1962c43 Compare September 27, 2022 16:41
@radoering radoering force-pushed the zip-subdir-file-dependency branch 2 times, most recently from bf17206 to 561d07e Compare October 15, 2022 12:55
@radoering radoering force-pushed the zip-subdir-file-dependency branch 2 times, most recently from 8648178 to 1714041 Compare November 5, 2022 08:19
@sonarcloud
Copy link

sonarcloud bot commented Nov 5, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.7% 0.7% Duplication

@radoering radoering force-pushed the zip-subdir-file-dependency branch 2 times, most recently from 613a114 to ac23f76 Compare April 23, 2023 15:38
@radoering radoering force-pushed the zip-subdir-file-dependency branch 3 times, most recently from 9cc1105 to 74bcc47 Compare April 28, 2023 15:42
@radoering radoering requested a review from a team April 28, 2023 16:15
@radoering radoering force-pushed the zip-subdir-file-dependency branch from 74bcc47 to b2b2cce Compare May 8, 2023 14:26
@sonarcloud
Copy link

sonarcloud bot commented May 8, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@radoering radoering enabled auto-merge (squash) May 8, 2023 14:27
@radoering radoering merged commit 3ba73c3 into python-poetry:main May 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants