radon-defect-prediction
The RADON command-line client for Infrastructure-as-Code Defect Prediction.
How to Install
From PyPI:
pip install radon-defect-predictor
From source code:
git clone https://github.com/radon-h2020/radon-defect-prediction.git
cd radon-defect-predictor
pip install -r requirements.txt
pip install .
Quick Start
usage: radon-defect-predictor [-h] [-v] {train,predict,model} ...
A Python library to train machine learning models for defect prediction of infrastructure code
positional arguments:
{train,predict,model}
train train a brand new model from scratch
model get a pre-trained model to test unseen instances
predict predict unseen instances
optional arguments:
-h, --help show this help message and exit
-v, --version show program's version number and exit
How to build Docker container
docker build --tag radon-dp:latest .
How to run Docker container
First, create a host volume to share data and results between the host machine and the Docker container:
mkdir /tmp/radon-dp-volume/
Train
Create a training dataset metrics.csv and copy/move it to /tmp/radon-dp-volume/.
See how to generate the training data for defect prediction here.
Run:
docker run -v /tmp/radon-dp-volume:/app radon-dp:latest radon-defect-predictor train metrics.csv ...
See the docs for more details about this command.
The built model can be accessed at /tmp/radon-dp-volume/radondp_model.joblib.
Model
Run:
docker run -v /tmp/radon-dp-volume:/app radon-dp:latest radon-defect-predictor download-model ...
See the docs for more details about this command.
The downloaded model can be accessed at /tmp/radon-dp-volume/radondp_model.joblib.
Predict
Move the model and the files to predict in the shared volume. For example, if you want to run the prediction on a .csar, then
cp patah/to/file.csar /tmp/radon-dp-volume.
Alternatively, you can create a volume from the folder containing the .csar (in that case, make sure to move the model within it).
Run:
docker run -v /tmp/radon-dp-volume:/app radon-dp:latest radon-defect-predictor predict ...
See the docs for more details about this command.
The predictions can be accessed at /tmp/radon-dp-volume/radondp_predictions.json.
Metadata
Release files for radon-defect-predictor 0.2.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| radon-defect-predictor-0.2.7.tar.gz | 13.5 kB | Without provenance | Details for radon-defect-predictor-0.2.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| radon_defect_predictor-0.2.7-py3-none-any.whl | Python 3 | none | any | Details for radon_defect_predictor-0.2.7-py3-none-any.whl |
Total release size: 28.7 kB
Release files / radon-defect-predictor-0.2.7.tar.gz
| Download URL | radon-defect-predictor-0.2.7.tar.gz |
|---|---|
| Size | 13.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3b13cb01af853399d69ddbd6c757235337020211dc3484027653038856f70b89
|
|
BLAKE2b-256 checksum How to use checksums |
1a182a5eae2c8a7023c549bd9243a91604d064ea19bff2626300161478e3fe7b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.5
|
Release files / radon_defect_predictor-0.2.7-py3-none-any.whl
| Download URL | radon_defect_predictor-0.2.7-py3-none-any.whl |
|---|---|
| Size | 15.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9ef9a0e3a098db215a2bdf328854bc1f56d2de77b277d070876d40e710fd1626
|
|
BLAKE2b-256 checksum How to use checksums |
a22bb1f6e3d115a559a992092b069bd4e4865616c4ff7bc3f21e48f67b8fa6b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.5
|
Security for radon-defect-predictor 0.2.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.