Skip to main content

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

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

metrics-felbeaver-0.0.1.tar.gz (12.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

metrics_felbeaver-0.0.1-py3-none-any.whl (14.1 kB view details)

Uploaded Python 3

File details

Details for the file metrics-felbeaver-0.0.1.tar.gz.

File metadata

  • Download URL: metrics-felbeaver-0.0.1.tar.gz
  • Upload date:
  • Size: 12.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.4.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.9

File hashes

Hashes for metrics-felbeaver-0.0.1.tar.gz
Algorithm Hash digest
SHA256 f69988d345c68b0e53808e37cdab6edff0421375f5dd210a11e97f12f276d7fe
MD5 b703e4b0f67e529cb105c11fcd3d1422
BLAKE2b-256 eeaca2bab9edfa0393d1dc7148401f62fd044cfce6fa4914843576db039b5d80

See more details on using hashes here.

File details

Details for the file metrics_felbeaver-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: metrics_felbeaver-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 14.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.4.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.9

File hashes

Hashes for metrics_felbeaver-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6236867abef1b684384a12aed571a4fe653529cdf51ec15c1b2302593ab9589f
MD5 af12a4941571adcb57769cf043e783c1
BLAKE2b-256 0d500bfa5f4283b40482b262cdc174ea8828a3679b2a1149c672730c9f360b71

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page