Log the resolved commit SHA when installing package via Git URI to make it easier to debug
See original GitHub issueWhat’s the problem this feature will solve?
Currently, when we install a package via Git URI, pip
doesn’t tell us what the current commit SHA is:
$ pip install git+https://github.com/scikit-learn/scikit-learn.git
Collecting git+https://github.com/scikit-learn/scikit-learn.git
Cloning https://github.com/scikit-learn/scikit-learn.git to /tmp/pip-req-build-lna_339q
Running command git clone -q https://github.com/scikit-learn/scikit-learn.git /tmp/pip-req-build-lna_339q
Let’s say we run the command above in CI to run tests against the dev version of scikit-learn. If the current commit hash was shown, it would help us indetify commits/changes that break the tests.
Describe the solution you’d like
Just show the current commit SHA after cloning the repo.
Alternative Solutions
$ pip freeze | grep scikit-learn
scikit-learn @ git+https://github.com/scikit-learn/scikit-learn.git@f2fb07581339f063b501b3e820917d66ee4c1fa3
# However, this doesn't work for the following use case:
$ pip wheel git+https://github.com/scikit-learn/scikit-learn.git
$ pip install path/to/built/wheel
$ pip freeze | grep scikit-learn
scikit-learn @ file:/path/to/built/wheel
Additional context
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Git - Submodules - Git SCM
This lets you clone another repository into your project and keep your commits separate. Starting with Submodules. We'll walk through developing a simple...
Read more >Commits API - GitLab Docs
This API operates on repository commits. Read more about GitLab-specific information for commits. Responses. In commit responses, created_at and ...
Read more >GitHub Action for running Cypress end-to-end tests
If you re-run the GitHub workflow, if you use the same custom build id during recording, Cypress Cloud will cancel the run with...
Read more >Adding package dependencies to your app - Apple Developer
When you enter the package dependency's URL or pick a Swift package from the ... It lists the specific Git commits to which...
Read more >simple-git - npm
Simple GIT interface for node.js. Latest version: 3.15.1, last published: 21 days ago. Start using simple-git in your project by running ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
IIRC (didn’t check) it’s already available in debug mode, and moving it to
INFO
does make sense to me. We also recently introduced a new verbose log level, so changing it to show in-v
also makes sense. And if it wasn’t already present, we should add it.A PR would be very welcomed!
Got it, I’ll file a PR!