A Python library for computing various software metrics from the source code
Project description
Metrics is a Python package for computing various software metrics from the source code. This package can compute:
raw metrics (various LOC, blank lines, different line averages and line percentages, etc.)
Halstead metrics
McCabe’s complexity (cyclomatic complexity)
Henry-Kafura Information Flow metrics (module complexity)
Usage
Metrics package can be used from command line or programmatically. Here’s a code example of using package API:
import metrics metrics.foo('source_file.c') # returns a value
A command line usage example is shown below:
$ metrics cc source_file.c source_file.c F 356:0 func1 F 1093:0 func2 Average complexity: F (724.5)
Detailed documantation for how package can be used is at https://metrics.readthedocs.org/.
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
Lisence
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for metrics_felbeaver-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6236867abef1b684384a12aed571a4fe653529cdf51ec15c1b2302593ab9589f |
|
MD5 | af12a4941571adcb57769cf043e783c1 |
|
BLAKE2b-256 | 0d500bfa5f4283b40482b262cdc174ea8828a3679b2a1149c672730c9f360b71 |