Script to gather stats on the status of various typeshed packages
Project description
What's this project for?
This project is for easy gathering of statistics relating to typeshed's stubs.
Some examples of things you can do from the command line:
- Create a
.csv
file with stats on all typeshed stubs:typeshed-stats --typeshed-dir <PATH_TO_TYPESHED_CLONE> --to-file stats.csv
(the.csv
file extension will be automatically detected by the script to identify the format required). - Pretty-print stats on typeshed stubs for emoji and redis to the terminal, in JSON format:
typeshed-stats --typeshed-dir <PATH_TO_TYPESHED_CLONE> --to-json emoji redis
- Generate a MarkDown file detailing stats on typeshed's stubs for protobuf and the stdlib:
typeshed-stats --typeshed-dir <PATH_TO_TYPESHED_CLONE> --to-file stats.md stdlib protobuf
Example usage of the Python-level API:
from typeshed_stats.gather import tmpdir_typeshed, gather_stats
with tmpdir_typeshed() as typeshed:
stats = gather_stats(typeshed_dir=typeshed)
How can I use this?
- Run
pip install git+https://github.com/AlexWaygood/typeshed-stats.git#egg=typeshed-stats[everything]
to install the package - Run
typeshed-stats --help
for information about various options
Are there any examples of things this script can produce?
I'm glad you asked! They're in the examples/
folder in this repo.
(These examples are generated using the regenerate_examples.py
script in the repository root.)
How do I run tests/linters?
- Clone the repo and
cd
into it - Create and activate a virtual environment
- Run
pip install -r requirements-dev.txt
- Run
pip install -e .[everything]
- Either run the linters/tests individually (see the
.github/workflows
directory for details about what's run in CI) or use theruntests.py
convenience script to run them all in succession.
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
typeshed_stats-22.11.0.tar.gz
(56.7 kB
view hashes)
Built Distribution
Close
Hashes for typeshed_stats-22.11.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a0a2940e50f6189b1daab86f7475fd2f91ebf6c01afd819a31b7174d300ed088 |
|
MD5 | 6c3cf02346147995e3b0d982fb115432 |
|
BLAKE2b-256 | e47c1ccdfc75f17ddff0871ad065768ff46b9c025ac69ea72b94db0fb4ab4dcb |