display the directory path of the found requirements.txt file #4987
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Thank you for contributing to Pipenv!
The issue
What is the thing you want to fix? Is it associated with an issue on GitHub? Please mention it.
#2222
#2870
Always consider opening an issue first to describe your problem, so we can discuss what is the best way to amend it. Note that if you do not describe the goal of this change or link to a related issue, the maintainers may close the PR without further review.
If your pull request makes a non-insignificant change to Pipenv, such as the user interface or intended functionality, please file a PEEP.
The fix
How does this pull request fix your problem? Did you consider any alternatives? Why is this the best solution, in your opinion?
When pipenv does not find Pipfile, it tries to find requirements.txt file, if the file is not in the same directory, then, pipenv looks in the parent directories (the default settings PIPENV_MAX_DEPTH=3).
when pipenv finds the requirements.txt file either in the same folder or in one of the parent folders, it prints the message: "requirements.txt found, instead of Pipfile! Converting...".
I think this message is cofusing for the user when there is no requirements.txt file stored in the same folder and the user might not know that pipenv looks in the parent folders as well.
The confusion here could be avoided by displaying to the user the folder path of the requirements.txt file where pipenv found it.
Here is my proposal: "requirements.txt found in <requirements.txt-DIR-PATH> instead of Pipfile! Converting..."
I bolded requirements.txt and Pipfile and colored the directory path to the requirements.txt file with Yellow.
The checklist
news/
directory to describe this fix with the extension.bugfix
,.feature
,.behavior
,.doc
..vendor
. or.trivial
(this will appear in the release changelog). Use semantic line breaks and name the file after the issue number or the PR #.