Commit Graph

15 Commits

Author SHA1 Message Date
Tom Terrace 41b3fbf9ee replace confusing deps warning with conflicting deps 2015-12-26 09:02:06 -05:00
Tom Terrace 0364d7c2da Add a warning for dependencies that are missing/unsatisfied 2015-12-04 16:17:22 -05:00
Vineet Naik 49965622af Make code compatible with 2.6 and 3.x
- Replaced '.iteritems()' with '.items()'
- Replaced '{k: v for k,v in ..}' with 'dict((k, v) for k,v ..)'
2015-11-09 00:51:37 +05:30
Vineet Naik fdbe63116f Add --reverse flag for showing dep tree in reverse 2015-11-09 00:32:40 +05:30
Vineet Naik 8db536eab3 Majorly refactor the code
The primary reason behind refactoring the code is to be able to make it
straightforward to implement the --reverse mode (ie. instead of showing
package and their sub-deps, it will show the sub-deps and the packages
that need them).

As a part of this change, wrapper classes have been added for
Distribution and Requirements instances that pip returns. These wrapper
classes have handle the rendering of the pkg as a root (top level) and a
branch (non-top level) accordingly. As a result the same function
`render_tree` can be used for --reverse mode.

This change doesn't include the --reverse mode implementation. It will
be added in the subsequent commit.
2015-11-09 00:32:39 +05:30
Vineet Naik d13ff8bdef Modify test workflow
This commit decouples the test virtualenv creation from tox and simplify
it for running both locally and on travis-ci. Creation of the test
virtualenvs now happen via Makefile target 'test-env' which will create
2 virtualenvs in the dir tests/virtualenvs and also dump their
respective package data in .pickle files that will be used by the tests.

Also, builds on travis now no longer depend on tox but reuses some of
the Makefile targets for test virtualenv creation/cleanup.
2015-07-30 00:07:15 +05:30
Vineet Naik db33a5d788 Don't show bullets if freeze option is enabled
This makes the output of pipdeptree (with freeze flag) pip friendly
ie. the output can be saved in a requirements.txt file. At the same time
it's human readable due to indentations for sub-dependencies.

There is however one gotcha! In case pip finds a dependency multiple
times in the requirements.txt file, it fails. So the user will need to
take care about this when dumping the output in requirements.txt.

Fixes #31.
2015-07-26 23:12:10 +05:30
Vineet 617c46e889 Add tests for function 'peek_into' 2014-10-07 23:28:25 +05:30
Vineet 717e07d492 Move cyclic_deps.pickle inside tests/virtualenvs
for consistency
2014-06-22 21:31:35 +05:30
Marc Abramowitz fd0c477192 Restore Python 2.6 compatibility
c70525bb84 broke Python 2.6 compatibility
by using a dict comprehension, which is a Python 2.7 feature. I replaced
it with calling dict with a generator expression, which looks almost as
good and it works in Python 2.6.
2014-06-17 23:06:46 -07:00
Vineet c70525bb84 Fix failing tests
The tests were failing due to pull requests #14 and #16, which passed tests
individually but lead to failure after both were merged.
2014-06-18 10:28:15 +05:30
Marc Abramowitz b6eea3084a Add test_render_tree_cyclic_dependency
Test for issue in #13 (https://github.com/naiquevin/pipdeptree/issues/13)
2014-06-16 10:05:30 -07:00
Marc Abramowitz b94fabc8dc Workaround for pip issue 1867
https://github.com/pypa/pip/issues/1867

When hash randomization is enabled, pip can return different names for
git editables from run to run.

This change accounts for that in the tests for freezed output.
2014-06-16 07:50:16 -07:00
Vineet 6d094a049c Resolve merge conflicts 2014-06-14 23:44:16 +05:30
Marc Abramowitz 32c30cb800 Switch from nose to pytest
Nicer output when asserts fail

Also more actively maintained and more flexible (e.g.: fixtures,
conftest.py)
2014-06-12 15:55:52 -07:00