Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork938
Description
README.md
says:
The list of dependencies are listed in
./requirements.txt
and./test-requirements.txt
. The installer takes care of installing them for you.
That is not accurate, because while dependencies listed intest-requirements.txt
are included in the list passed astests_require
insetup.py
, this does not actually cause them to be installed. AsREADME.md
later notes, they currently have to be installed with a command likepip install -r test-requirements.txt
. That makes the above text in the readme misleading, because this isnot the case forrequirements.txt
dependencies, which do not have to be installed manually.
(Two related things: The CI workflows currently must install fromrequirements.txt
explicitly because they do not install the project itself. Thetest_installation
unit test installs fromrequirements.txt
before installing the project itself, which should probably not be done, because this makes it so that test would not fail if installing GitPython failed to entail installation of its dependencies, which could arise as a regression in a change tosetup.py
.)
There are at least three distinct ways this documentation bug could be fixed:
- Remove the claim that the installer takes care of this, while making no other changes.
- Remove the claim that the installer takes care of this, and remove the
test_require
keyword argument from thesetup
call insetup.py
. - Use an extra instead of
tests_require
so that there really is a way to install the package such that not only are the test dependencies downloaded but they are also installed automatically in the environment in which GitPython and its regular dependencies are installed. This has the substantial disadvantage that it is somewhat unintuitive to have an extra providing dependencies for functionality that is not itself part of the package people download from PyPI. But it would have the the advantage that it would fully achieve what appears to be intended or at least aspired to and that, depending on what other changes are being made, it might make the dependency installation procedure faster and simpler.
I've opened#1654, which fixes this as well as some other issues. I took the approach of making atest
extra, but as noted in the PR description, that can be changed, including to either of the other two approaches I've suggested here.