Python tool to track outdated dependencies.
Project description
Welcome to dependency-metrics
Summary
A command line tool to analyze and monitor how up-to-date dependencies of a project are. For more detail, see the Usage section below.
Supported Package Managers
- pip
- yarn
Supported Application Monitoring Platforms
- DataDog
Usage
Run the metrics tool from within the repository you wish to generate metrics for.
Default behavior
All that is needed is the package manager you want to generate metrics for, and metrics will output a table detailing
how out-of-date each dependency is.
$ metrics pip
Behind Package Latest Version
0.1.0 my-depedency 1.1.0 1.0.0
2.0.0 my-other-dependency 3.2.1 1.2.3
--stats option
Use the --stats option to generate a simple dictionary that displays the total number of outdated dependencies, as well as a breakdown detailing the number of outdated dependencies for each version type.
$ metrics pip --stats
Total: 5
Outdated: 2
Multi-Major: 1
Major: 0
Minor: 1
Patch: 0
Unknown: 0
--send option
NOTE: Additional setup is required to successfully post stats to a supported backend. See platform setup for further information.
Use the --send option to post the same metrisc generated by --stats to an application monitoring platform.
$ metrics pip --send
Application Monitoring Platform Setup
This is required to make use of the --send option, enabling the ability to send generated stats to a backend of your choice.
DataDog
Set the DATADOG_API_KEY and DATADOG_APP_KEY environment variables in the environment you will run metrics <package_manager> --send from.
Development
Requirements
pip install -e . # installs dependencies defined in pyproject.toml
pip install -e .[test] # installs test dependencies -- '.[test]' if using zsh
Tests
Must install test dependencies first. See requirements above.
nose2 # runs all tests
nose2 dot.path.to.file.class.or.test # runs specific test
Publishing to PyPI
To publish a new release on pypi.org:
- Update
__version__in dependency_metrics/init.py. - Create and push a git tag with the new version number.
git tag vX.Y.Z git push --tags
- Wait for the pypi.yml workflow to build and publish the new release.
A dev release is published on test.pypi.org on each new push or merge to main. A dev release may also be published on-demand for any branch with workflow dispatch.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dependency_metrics-0.1.2.tar.gz.
File metadata
- Download URL: dependency_metrics-0.1.2.tar.gz
- Upload date:
- Size: 12.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b35d101c79b267c9fe67177eff4151d9e284e75d1b983c439f114f736da98565
|
|
| MD5 |
1c6cf9006b1cc0c9e7675acd259badf4
|
|
| BLAKE2b-256 |
765892fbbcbba8243bc165d10d8977239335f4a2cd5b37bb184bababa9a002b5
|
Provenance
The following attestation bundles were made for dependency_metrics-0.1.2.tar.gz:
Publisher:
pypi.yml on dimagi/dependency-metrics
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dependency_metrics-0.1.2.tar.gz -
Subject digest:
b35d101c79b267c9fe67177eff4151d9e284e75d1b983c439f114f736da98565 - Sigstore transparency entry: 198301193
- Sigstore integration time:
-
Permalink:
dimagi/dependency-metrics@ae8480603ea6e837fb15682ea743966195e3b9d2 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/dimagi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@ae8480603ea6e837fb15682ea743966195e3b9d2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file dependency_metrics-0.1.2-py3-none-any.whl.
File metadata
- Download URL: dependency_metrics-0.1.2-py3-none-any.whl
- Upload date:
- Size: 12.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f7e23afdf9e328094efd92a0a7ccd17004a5105fb6933c8e525acc7444cd4b4
|
|
| MD5 |
1268fcebdc774e71f6951585a13a8d6a
|
|
| BLAKE2b-256 |
bed80c5cb12dbab76756d0aa0b22a87886e80c62921b8baf06334cea41942f45
|
Provenance
The following attestation bundles were made for dependency_metrics-0.1.2-py3-none-any.whl:
Publisher:
pypi.yml on dimagi/dependency-metrics
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dependency_metrics-0.1.2-py3-none-any.whl -
Subject digest:
7f7e23afdf9e328094efd92a0a7ccd17004a5105fb6933c8e525acc7444cd4b4 - Sigstore transparency entry: 198301197
- Sigstore integration time:
-
Permalink:
dimagi/dependency-metrics@ae8480603ea6e837fb15682ea743966195e3b9d2 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/dimagi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@ae8480603ea6e837fb15682ea743966195e3b9d2 -
Trigger Event:
push
-
Statement type: