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

Add :parent path modifier #1160

Merged
merged 2 commits into from
Dec 18, 2023
Merged

Add :parent path modifier #1160

merged 2 commits into from
Dec 18, 2023

Conversation

JP-Ellis
Copy link
Contributor

Add a new :parent modifier for path. This can be specified any numbers of times, with each addition stripping one level from the path.

This is useful in the context of a monorepo to help normalise paths between sibling packages.

Resolves: #825

@JP-Ellis
Copy link
Contributor Author

JP-Ellis commented Dec 18, 2023

Note that this PR, for now, only includes the code changes. If this is a desired feature, I will add some documentation as well before this gets merged.

Add a new `:parent` modifier for path. This can be specified any numbers
of times, with each addition stripping one level from the path.

This is useful in the context of a monorepo to help normalise paths
between sibling packages.

Resolves: #825

Signed-off-by: JP-Ellis <[email protected]>
@JP-Ellis
Copy link
Contributor Author

Updated the tests to be less fragile in case the tests directory is very shallow (e.g. within /tmp). Local tests worked fine for me, but broke on CI.

Copy link
Collaborator

@ofek ofek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much!

@ofek ofek merged commit 2aa3018 into pypa:master Dec 18, 2023
33 checks passed
@JP-Ellis JP-Ellis deleted the feat/parent-path-modifier branch December 18, 2023 03:31
github-actions bot pushed a commit that referenced this pull request Dec 18, 2023
* Add ':parent' path modifier

Add a new `:parent` modifier for path. This can be specified any numbers
of times, with each addition stripping one level from the path.

This is useful in the context of a monorepo to help normalise paths
between sibling packages.

Resolves: #825

Signed-off-by: JP-Ellis <[email protected]>

* update

---------

Signed-off-by: JP-Ellis <[email protected]>
Co-authored-by: Ofek Lev <[email protected]> 2aa3018
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.

Relative path dependency conflict for same absolute path
2 participants