markfink / metrics

produces metrics for Python, C, C++, Go and Javascript programs (plugins for pylint, pytest-cov, and git available)
MIT License
16 stars 8 forks source link

enhancement allow main entrypoint #11

Open mcallaghan-bsm opened 5 years ago

mcallaghan-bsm commented 5 years ago

I think some users are a bit confused on how to run metrics outside of pip installation. For example, in https://github.com/finklabs/metrics/issues/7.

Also, during development, I found it useful to have a simple entrypoint for the metrics runner from a terminal. I called it run_metrics.py, it is very simple. Open to feedback/suggestions/preferences by maintainer. @markfink

This enables simply:

$ pipenv run python3 run_metrics.py --help
Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -f IN_FILE_LIST, --files=IN_FILE_LIST
                        File containing list of path names to modules for
                        analysis.
  -q, --quiet           suppress normal summary output to stdout. (Default is
                        False)
  --format=OUTPUT_FORMAT_STR
                        Choose an output format for a parser to read. Valid
                        choices: xml, csv, json