-
Notifications
You must be signed in to change notification settings - Fork 290
feat: Add the ability to skip install of local source dependencies #3092
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
base: main
Are you sure you want to change the base?
Conversation
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.
Thanks @olivier-lacroix, would you be able to add a test to validate that this works for both conda and PyPI path dependencies. And add the CLI documentation?
Can do yes :-) |
@ruben-arts what sort of test(s) do you think would be best? unit test(s) and/or integration tests? |
For Pypi you might use the |
@@ -7,7 +7,7 @@ pub mod environment; | |||
mod global; | |||
mod install_pypi; | |||
pub mod lock_file; | |||
mod prefix; | |||
pub mod prefix; |
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.
Made this public to be able to test if a package was in the prefix. Is this ok?
@ruben-arts integration test added. Let me know what you think. |
66caae2
to
9a7c9df
Compare
d0391b1
to
5965f12
Compare
Yeah you are right that should be fine :) only skipping the folders then, I
suppose. You would still want to install sdists from paths and direct urls
right? Or do you want to skip those as well with the flag set?
…On Tue, 18 Feb 2025 at 22:30, Olivier Lacroix ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In src/lock_file/update.rs
<#3092 (comment)>:
> @@ -483,6 +498,10 @@ impl<'p> LockFileDerivedData<'p> {
Ok(locked_env
.conda_packages(platform)
+ .map(|packages| {
+ packages
+ .filter(|p| !no_path_dependencies || matches!(p.location(), UrlOrPath::Url(_)))
@tdejager <https://github.com/tdejager> would detecting if the path is a
folder or not work?
—
Reply to this email directly, view it on GitHub
<#3092 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADF4XRTROOCA7B45NFCVQD2QORADAVCNFSM6AAAAABWYRQH5OVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDMMRVGA3TMMZXGM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I guess so. the intent is really to skip packages that are being developed. Quick one, is there a straightforward way to know if a |
I think |
0d5875e
to
38fdf94
Compare
38fdf94
to
98bc642
Compare
That'd be nice, but this is available in the |
Alright, @tdejager @ruben-arts this PR is about ready to be merged I think. @tdejager , a I was not 100% happy with the flag name |
Hey @olivier-lacroix, @ruben-arts and myself have been discussing this PR offline just now, and we wanted to report back. So while we do think the idea is good there are a couple of things, also because of my suggestion that do not work out. So supposing you still want to skip development dependencies:
Additionally, @ruben-arts and I discussed that we think that a general We are really sorry about the tardiness regarding this PR, and totally understand that it would be to much work to change this so happy to take this over from you if you do not want to make the change. |
@tdejager fair enough. I'll implement it. |
Fixes #1652
This PR implements an additional
--skip-local-sources
argument forpixi install
, that will skip installation of local path dependencies.As this argument is intended to be used in cases where these local dependencies may be absent, we do not want to update the lockfile, and the use of
--skip-local-sources
requires the "--frozen" argument.With this PR, a dockerfile using pixi may look like