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
Allow pip requirements.txt syntax in environment files #3969
Conversation
I think these failing tests have nothing to do with the changes in this PR. |
79f981f
to
b486223
Compare
cbfd52c
to
a27318e
Compare
dd0bdea
to
4ccaaf1
Compare
I have polished the PR a bit: better description, fixed paths on windows tests, squashed to one commit and changed the target branch to upstream 4.3.x. The tests still fail for reasons that have nothing to do with this commit (I think because of recent changes to the packages in anaconda.org). I will trigger again test execution when these problems get fixed (e.g. if #4145 is merged). |
4ccaaf1
to
3a40fdf
Compare
@tdhopper We also need #4169 merged to get the green tick. Will keep an eye and trigger when it gets merged. Even then this PR might not get reviewed anytime soon. I think the admins face a pile of work. What could be useful is to actually check that --extra-index also works when directly used in the environment yaml (I do not see why it would not). Do you have an example of a public url I could try, so I can add it to the PR description after making sure it does work? |
@sdvillal: I put an index up at http://pythonextraindextest.com.s3-website-us-east-1.amazonaws.com with a package called |
f0e5809
to
a29b5cc
Compare
Thanks @tdhopper, that was useful. I have now updated the PR description and added integration tests to the pull request after confirming that everything seems to work as expected. On the way I have fixed conda not listing pip packages installed on editable mode. Hopefully this makes everything better and easier to review. And hopefully we finally earn that green tick. In the example and the tests (which are just running that example) I'm using a official pip mirror to show how to change pip index priorities. You can delete your test index if you want to. |
530dc81
to
4047934
Compare
Green tick, ready to merge. If merged, something like this could go to the changelog: ### Improvements
* accept all valid pip syntax in environment files (#3969)
### Bug Fixes
* Follow egg links when listing pip packages. Fixes, for
example, `conda list` on the presence of packages
installed on editable mode. (#3969) |
- runs pip from the same directory where the environment file resides - adds reference to pip requirements file format - adds some tests
4047934
to
996a450
Compare
Codecov Report
@@ Coverage Diff @@
## 4.3.x #3969 +/- ##
==========================================
- Coverage 86.05% 85.35% -0.71%
==========================================
Files 86 82 -4
Lines 10124 9595 -529
==========================================
- Hits 8712 8189 -523
+ Misses 1412 1406 -6
Continue to review full report at Codecov.
|
includes working example of advanced pip use
996a450
to
0ce1f87
Compare
Codecov Report
@@ Coverage Diff @@
## 4.3.x #3969 +/- ##
==========================================
- Coverage 86.05% 85.35% -0.71%
==========================================
Files 86 82 -4
Lines 10124 9595 -529
==========================================
- Hits 8712 8189 -523
+ Misses 1412 1406 -6
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## 4.3.x #3969 +/- ##
==========================================
+ Coverage 86.05% 86.06% +0.01%
==========================================
Files 86 86
Lines 10124 10128 +4
==========================================
+ Hits 8712 8716 +4
Misses 1412 1412
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## 4.3.x #3969 +/- ##
==========================================
+ Coverage 86.05% 86.06% +0.01%
==========================================
Files 86 86
Lines 10124 10128 +4
==========================================
+ Hits 8712 8716 +4
Misses 1412 1412
Continue to review full report at Codecov.
|
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.
LGTM. Preparing for 4.4.0 soon. This will be in it.
Thanks Kale, looking forward to the new release. |
Hi there, thank you for your contribution to Conda! This pull request has been automatically locked since it has not had recent activity after it was closed. Please open a new issue or pull request if needed. |
resolves #3763
resolves #4378
Currently the declaration of pip dependencies in conda
environment.yml
files is limited to a list of strings that would be accepted in a pip command line. This disallows using pip requirement files or installing pip dependencies in editable mode (unless using lesser known syntax tricks like"--editable=my_project"
). Both are use cases I have missed recently and have also been requested elsewhere (e.g. #3763 #4378). This PR enables the full pip requirement file syntax and features to be used inenvironment.yml
files. For example:As far as I can tell, these simple changes should not break any existing environment specification.
Also this PR fixes conda not listing pip egg-link dependencies (for example, dependencies installed in editable mode), and adds some integration tests to make sure pip packages are installed correctly (these tests depend on pypi to be up).
If merged, something like this could go to the changelog: