226 Commits

Author SHA1 Message Date
Jon Banafato
51446ac2be
Merge pull request #104 from jonafato/changelog-dates
Add dates to recent changelog entries
2017-10-31 15:26:40 -04:00
Jon Banafato
52505ce32c Add dates to recent changelog entries
Via https://pypi.python.org/pypi/pipreqs/json
2017-10-31 15:18:45 -04:00
Jon Banafato
800abc43e3 Merge pull request #95 from jonafato/cleanup-get_all_imports
Clean up set and file usage in get_all_imports
2017-10-26 17:03:17 -04:00
Jon Banafato
aae6c61f09 Clean up set and file usage in get_all_imports
- Move logic that doesn't need to be inside of file context managers
  outside
- Remove redundant `set` and `list` function calls
2017-10-26 16:36:12 -04:00
Jon Banafato
7afbcb4b16 Merge pull request #102 from jonafato/cleanup-get_pkg_names
Simplify get_pkg_names function
2017-10-26 16:33:31 -04:00
Jon Banafato
84b2e37707 Simplify get_pkg_names function
- Hoist non-file-reading logic outside of the file context manager
- Use a dict instead of a list for faster / more Pythonic lookups
- Use a set to simplify the add / append logic
- Move import sorting from `get_all_imports` to `get_pkg_names` for
  to account for set ordering. This change may also affect #89.
- Add a docstring
2017-10-26 12:16:32 -04:00
Jon Banafato
e0f9ae8c6a Merge pull request #99 from jonafato/flake8
Flake8
2017-10-24 15:17:53 -04:00
Jon Banafato
e88b5ab19c Fix flake8 errors 2017-10-24 15:14:58 -04:00
Jon Banafato
d1a7eda5e8 Enable flake8 linting in tox.ini and .travis.yml
Currently, flake8 is accessible via `make lint`, but it does not run
along side the rest of the test suite. This change adds flake8 checks to
the tox.ini file to enable linting as a routine part of running tests.

Additionally, drop the changes made in #100.
2017-10-24 15:14:52 -04:00
Jon Banafato
1d48345cb0 Merge pull request #100 from jonafato/tox-on-travis
Run Travis-CI tests inside of tox
2017-10-24 14:20:31 -04:00
Jon Banafato
0a9845d87d Run Travis-CI tests inside of tox
By using tox instead of the default Travis-CI Python environments, we
ensure that we have a single entrypoint to testing both locally and in
CI. This reduces redundant code and makes it clear when test
environments don't match up on different platforms.

[tox-travis](https://tox-travis.readthedocs.io/en/stable/) is introduced
here to automatically run tox jobs under the proper Travis-CI
environments. Additionally, the coveralls step is moved to a [build
stage](https://docs.travis-ci.com/user/build-stages) to run once after
all other Travis-CI tests complete.
2017-10-24 14:08:18 -04:00
Jon Banafato
08160bdf95 Merge pull request #97 from jonafato/optional-path
Support optional <path> argument
2017-10-23 23:34:07 -04:00
Jon Banafato
c80d06593d Support optional <path> argument
This change makes the <path> argument optional, defaulting to the
current working directory if omitted.

---

Ideally, this would have been accomplished via docopt, but optional
positional arguments with defaults are not supported at the moment [1, 2].

[1] https://github.com/docopt/docopt/issues/214
[2] https://github.com/docopt/docopt/issues/329
2017-10-22 23:45:16 -04:00
Jon Banafato
755e20196a Merge pull request #85 from zmwangx/correct-arrow-mapping
fix(pipreqs/mapping): correct arrow mapping
2017-10-21 14:13:38 -04:00
Zhiming Wang
d8c94d1690
fix(pipreqs/mapping): correct arrow mapping
https://pypi.org/project/arrow/ is https://github.com/crsmithdev/arrow/, the
real arrow.

https://pypi.org/project/arrow-fatisar/ is https://github.com/fatisar/arrow,
a completely random, outdated fork.
2017-10-21 14:05:47 -04:00
Jon Banafato
4d35819bbd Merge pull request #93 from jonafato/setup-py-quotes
Use single quotes consistently in setup.py
2017-10-20 16:16:16 -04:00
Jon Banafato
62e234ca01 Use single quotes consistently in setup.py 2017-10-20 16:08:56 -04:00
Jon Banafato
ab04f1276e Merge pull request #84 from rspencer01/master
Follow symbolic linked directories
2017-10-20 15:41:27 -04:00
Jon Banafato
2e65861ebc Merge pull request #72 from jonafato/python3.6
Declare support for Python 3.6
2017-10-20 14:38:34 -04:00
Jon Banafato
3b8419ca92 Declare support for Python 3.6
All tests pass under Python 3.6, so declare official support for it.
Closes #68.
2017-10-20 14:35:06 -04:00
Jon Banafato
dca65c3f42 Merge pull request #83 from jonafato/python-decouple-mapping
Add mapping for python-decouple
2017-10-20 14:33:04 -04:00
Jon Banafato
49a3d50c3d Merge pull request #87 from philfreo/patch-1
Minor README formatting consistency tweak
2017-10-20 14:31:37 -04:00
Jon Banafato
fc85d87fa2 Merge pull request #92 from jonafato/drop-eol-pythons
Drop support for end-of-lifed Python versions
2017-10-20 14:30:57 -04:00
Jon Banafato
5008bda188 Drop support for end-of-lifed Python versions
The following versions of Python are no longer supported by the core
developers of Python and pip:

- Python 2.6
    - End of life on 2013-10-29 [1]
    - Dropped from pip on 2017-03-18 [2]
- Python 3.3
    - End of life on 2017-09-29 [3]
    - Dropped from pip on 2017-03-22 [4]

Developers should migrate off of these versions ASAP, as they may be
missing critical security fixes.

[1] https://www.python.org/dev/peps/pep-0361/#release-lifespan
[2] https://github.com/pypa/pip/pull/4343
[3] https://www.python.org/dev/peps/pep-0398/#lifespan
[4] https://github.com/pypa/pip/pull/4355
2017-10-20 13:30:48 -04:00
Phil Freo
0555d849d6 Minor README formatting consistency tweak 2017-09-23 19:32:18 -04:00
Robert Spencer
77c865253c Follow symbolic linked directories
This makes pipreqs dive into directories that are symlinks as Python
recognises these.  If symlinks are not followed, then the requirements
will be incorrect.

We also add a command line option to disable following of symlinks if
need be.
2017-08-31 23:17:31 +02:00
Jon Banafato
42d9f03c79 Add mapping for python-decouple 2017-08-01 11:53:37 -04:00
Vadim Kravcenko
22e80c27c2 Merge pull request #80 from kxrd/fix-issue-74
Exclude concurrent{,.futures} from stdlib if py2
2017-06-30 17:37:40 +02:00
Vadim Kravcenko
9d02b40bc8 Version bump 2017-06-30 14:27:07 +02:00
Vadim Kravcenko
3601802ce2 Update README.rst 2017-06-30 14:22:24 +02:00
Vadim Kravcenko
ac4749681c Merge pull request #77 from kxrd/issue-18
Implement '--clean' and '--diff'
2017-06-30 14:20:54 +02:00
Vadim Kravcenko
2e796183fa Merge pull request #78 from jeepkd/add-mapping-dotenv
Add dotenv to mapping list
2017-06-22 20:47:53 +02:00
Jeep Kiddee
8106376b5e Add dotenv to mapping list 2017-06-22 18:19:05 +07:00
kxrd
254e1cedcb Improve variable module_version 2017-06-13 23:10:14 +02:00
kxrd
06e933ef3c Add new options 2017-06-13 22:55:16 +02:00
kxrd
e7b8ddf72d Replace with statement with a try/except/else/finally block to narrow down problem in the future 2017-06-13 22:22:27 +02:00
kxrd
54be2d1c24 Complete function clean 2017-06-13 22:03:21 +02:00
kxrd
d3efb942d5 Stop exctracting parameters in file, just return list of modules 2017-06-13 21:55:12 +02:00
kxrd
ac6ce860d0 Improve function diff docstring, begin function clean 2017-06-13 01:10:47 +02:00
kxrd
7549b1c416 Add and implement function diff, improve inline comments in function parse_requirements 2017-06-10 21:24:39 +02:00
kxrd
a78203dc2b Improve function parse_requirements docstring 2017-06-10 21:22:18 +02:00
kxrd
882a0d3ec3 Add docstring to function parse_requirements 2017-06-10 20:52:17 +02:00
kxrd
d8b497ea91 Rename function clean to compare_modules, have it return a tuple of modules not imported, add docstring 2017-06-10 20:43:54 +02:00
kxrd
1055a7a28b Add colon to error output for consistency 2017-06-10 20:02:43 +02:00
kxrd
888537a898 Improve except block in function parse_requirements 2017-06-10 20:01:42 +02:00
kxrd
b048c55fe6 Add clean function 2017-06-02 22:30:17 +02:00
kxrd
b6c53c6b02 Begin function clean 2017-06-02 21:16:17 +02:00
kxrd
d463b92810 Return tuple consisting of modules,parameters instead of a concatenated list 2017-06-02 21:13:47 +02:00
kxrd
cdb82c6d9b Switch out print statement against logging.error 2017-06-02 20:13:51 +02:00
kxrd
3d87f21392 Add file_ parameter to function parse_requirements, implement a try-except block in function parse_requirements 2017-06-02 19:59:59 +02:00