Skip to main content

typescore - generate typing completeness scores (and more) for a set of packages

Project description

typescore

typescore generates typing completeness scores (and more) for a set of packages.

Usage:

  typescore [--packages <packages>] [--scores <scorefile>] [--sep <sep>] [--verbose] [<package>...]
  typescore --help
  typescore --version

Options:
  --packages <packages> File containing the list of packages.
  --scores <scorefile>  The output file (if not stdout).
  --sep <sep>           CSV column separator. [default: ,]
  -v, --verbose         Include package info in the output.
  -h, --help            Show this help.
  -V, --version         Show the version.

typescore uses pyright to score the typing completeness of a set of Python packages. It reads this list from <packages> and writes the results to <scorefile>. If errors prevent it from scoring a package it will set the score to 0%.

The output has the form:

package,typed,module,score,extra_columns

or, if --verbose is specified:

package,version,typed,module,score,stub_package,package_description,extra_columns

typed is a Boolean and tells whether the package had a py.typed file.

Note: we only score top-level modules, not submodules. The assumption is that scores for top-level modules would be reasonably representative of the packages all-up.

<packages> should have one package name per line. It can be a CSV file with the package name as the first column, in which case other columns will be included in the score file output (the extra_columns). A typical extra column might be the package rank on PyPI downloads.

While it would be useful to be able to measure the coverage scores on stub packages too, pyright does not support doing so. As a result, you should evaluate whether a stub package is better than the inline types for a package yourself beffore making use of it.

See latest-scores.md for results in markdown form.

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

typescore-0.11.tar.gz (94.4 kB view details)

Uploaded Source

Built Distribution

typescore-0.11-py2.py3-none-any.whl (8.0 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file typescore-0.11.tar.gz.

File metadata

  • Download URL: typescore-0.11.tar.gz
  • Upload date:
  • Size: 94.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.28.1

File hashes

Hashes for typescore-0.11.tar.gz
Algorithm Hash digest
SHA256 9cf62897aa962361d576f4479c2849d85e608cf34e220baa045fd2a4c130e1a5
MD5 755a3ad11623078d40ccfe82cda49847
BLAKE2b-256 687c143e4ed5a29c19d23f6160e33d2fbb90687b7ef2c48e4821cbcdd45fbcde

See more details on using hashes here.

File details

Details for the file typescore-0.11-py2.py3-none-any.whl.

File metadata

  • Download URL: typescore-0.11-py2.py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.28.1

File hashes

Hashes for typescore-0.11-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 d30430666143329aa132227827cad2c97f7b6dffc9cdb91059a3703309e0e240
MD5 6d3ab6c6585c3ee46a85d398a7ca6fcb
BLAKE2b-256 988cab6d2500ea4714f78ef874a74ea7d58ca6ec190189894aa8c8df465114c9

See more details on using hashes here.

Supported by

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