Skip to content

Add pip install --editable functionality#101

Merged
cjdoris merged 22 commits intoJuliaPy:mainfrom
dingraha:pip_editable
Sep 17, 2025
Merged

Add pip install --editable functionality#101
cjdoris merged 22 commits intoJuliaPy:mainfrom
dingraha:pip_editable

Conversation

@dingraha
Copy link
Contributor

@dingraha dingraha commented Aug 2, 2023

This PR makes it possible to do the equivalent of pip install --editable <path/to/package> with CondaPkg.jl, as requested in #96

@codecov
Copy link

codecov bot commented Aug 2, 2023

Codecov Report

Merging #101 (ff37133) into main (4d48894) will increase coverage by 1.43%.
The diff coverage is 94.73%.

@@            Coverage Diff             @@
##             main     #101      +/-   ##
==========================================
+ Coverage   92.82%   94.25%   +1.43%     
==========================================
  Files           8        8              
  Lines         864      888      +24     
==========================================
+ Hits          802      837      +35     
+ Misses         62       51      -11     
Files Changed Coverage Δ
src/spec.jl 95.71% <85.71%> (+0.19%) ⬆️
src/resolve.jl 94.79% <91.66%> (+0.94%) ⬆️
src/PkgREPL.jl 100.00% <100.00%> (ø)
src/deps.jl 91.47% <100.00%> (+3.86%) ⬆️
src/meta.jl 98.68% <100.00%> (+0.11%) ⬆️

@lassepe
Copy link
Contributor

lassepe commented Aug 12, 2024

It looks like this PR got stuck. Is there a chance to revive it?

@cjdoris
Copy link
Member

cjdoris commented Aug 15, 2024

It looks like this PR got stuck. Is there a chance to revive it?

Sure, the PR looks good but has a load of merge conflicts. If you can resolve those I'll take a look.

@dingraha
Copy link
Contributor Author

@cjdoris @lassepe I finally got around to updating this PR. Seems to work, but I did have to think about how to properly distinguish between a URL and a local path. I ended up using a regex that looks for a foo:// prefix here: https://github.com/dingraha/CondaPkg.jl/blob/359ff05cd3c673b4741cef1901b79b7caff85885/src/spec.jl#L215-L243. Comments welcome. :-)

@dingraha
Copy link
Contributor Author

dingraha commented May 5, 2025

@cjdoris @lassepe Another ping on this PR. :-)

@lassepe
Copy link
Contributor

lassepe commented May 7, 2025

Nice! I just tested this locally and it works well for me. Only minor comment would be that it would be nice if conda pip_add --editable ./path/to/my_package just worked to match regular pip behavior. Currently, the user has to do conda pip_add --editable my_package@./path/to/my_package and hits a confusing error if the stuff before the @ has a typo.

That said, I think UI/UX improvements can totally land in a future PR to avoid stalling this any longer.

@cjdoris cjdoris merged commit 9527ba4 into JuliaPy:main Sep 17, 2025
@cjdoris
Copy link
Member

cjdoris commented Sep 17, 2025

Thanks for this and sorry for the delay in reviewing! Looks great. I made some small tweaks before merging but nothing drastic. Main change really was to the tests, just because some very similar tests got added in the meantime so I adapted those and removed yours.

@dingraha
Copy link
Contributor Author

@cjdoris Excellent, thank you!

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.

3 participants