Add `pip install --editable` functionality
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
Codecov Report
Merging #101 (ff37133) into main (4d48894) will increase coverage by
1.43%. The diff coverage is94.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: |
It looks like this PR got stuck. Is there a chance to revive it?
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 @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. :-)
@cjdoris @lassepe Another ping on this PR. :-)
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.
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 Excellent, thank you!