CondaPkg.jl icon indicating copy to clipboard operation
CondaPkg.jl copied to clipboard

Add `pip install --editable` functionality

Open dingraha opened this issue 2 years ago • 3 comments

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

dingraha avatar Aug 02 '23 19:08 dingraha

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%) :arrow_up:
src/resolve.jl 94.79% <91.66%> (+0.94%) :arrow_up:
src/PkgREPL.jl 100.00% <100.00%> (ø)
src/deps.jl 91.47% <100.00%> (+3.86%) :arrow_up:
src/meta.jl 98.68% <100.00%> (+0.11%) :arrow_up:

codecov[bot] avatar Aug 02 '23 19:08 codecov[bot]

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

lassepe avatar Aug 12 '24 15:08 lassepe

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.

cjdoris avatar Aug 15 '24 15:08 cjdoris

@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 avatar Mar 11 '25 13:03 dingraha

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

dingraha avatar May 05 '25 18:05 dingraha

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.

lassepe avatar May 07 '25 17:05 lassepe

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.

cjdoris avatar Sep 17 '25 21:09 cjdoris

@cjdoris Excellent, thank you!

dingraha avatar Sep 18 '25 13:09 dingraha