support tracking changes in requirements.txt without full rebuild #296
Labels
area:testenv-creation
feature:new
something does not exist yet, but should
help:wanted
Issues that have been acknowledged, a solution determined and a PR might likely be accepted.
level:hard
rought estimate that this might be quite hard to implement
Use case
during the development, you often switch between new and old requirements.
This currently forces the user to run
tox -r
.Sometimes it's not serious, but for automated tests in CI, using internet - it can be several minutes overhead of ~5 or even more minutes. This becomes problematic for short builds: test suite that runs 1 minutes is waiting for tox ~5 minutes.
scenarios I'd like to handle are:
Scope
only handle 4 situations, nothing else
Implementation:
Use
difflib
module's functionality: it already hasndiff()
seemingly very useful for this purpose.based on that diff we should generate 2 lists:
Testing should be done first on the function that properly detects what needs to be removed and what needs to be installed.
-I
option (i.e. older will be uninstalled)A relatively easy to implement approach would be to compare:
*. current pip freeze output (on the left)
requirements.txt
(on the right)As a result, if there are diffs (lines with "-" and lines with "+"), those with "-" can be uninstalled, and those with "+" - installed.
The text was updated successfully, but these errors were encountered: