Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/radon-h2020/radon-repository-miner
A mining tool written in Python to mine software repositories for Infrastructure-as-Code
https://github.com/radon-h2020/radon-repository-miner
ansible infrastructure-as-code mining-software-repositories
Last synced: 21 days ago
JSON representation
A mining tool written in Python to mine software repositories for Infrastructure-as-Code
- Host: GitHub
- URL: https://github.com/radon-h2020/radon-repository-miner
- Owner: radon-h2020
- License: apache-2.0
- Created: 2020-01-21T10:34:24.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-09-27T12:00:06.000Z (4 months ago)
- Last Synced: 2024-11-25T09:19:41.458Z (2 months ago)
- Topics: ansible, infrastructure-as-code, mining-software-repositories
- Language: Python
- Homepage: https://radon-h2020.github.io/radon-repository-miner/
- Size: 58.4 MB
- Stars: 8
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
![Build](https://github.com/radon-h2020/radon-repository-miner/workflows/Build/badge.svg)
![Codecov](https://img.shields.io/codecov/c/github/radon-h2020/radon-repository-miner)
[![Downloads](https://pepy.tech/badge/repository-miner/month)](https://pepy.tech/project/repository-miner)
![pypi-version](https://img.shields.io/pypi/v/repository-miner)
![python-version](https://img.shields.io/pypi/pyversions/repository-miner)# radon-repository-miner
RepositoryMiner is a Python framework that helps developers and researchers to mining software repositories.
It currently supports the Infrastructure as Code technology Ansible and Tosca.# How to install
First, ensure your `git version` is greater than `2.38.0`.
Then, from [PyPI](https://pypi.org/project/repository-miner/):
```pip install repository-miner```
Or, from source code:
```text
git clone https://github.com/radon-h2020/radon-repository-miner.git
cd radon-repository-miner
pip install -r requirements.txt
pip install .
```**Important:** to properly use the FixingCommitCategorized, install the spaCy statistical model `en_core_web_sm`:
`python -m spacy download en_core_web_sm`
# Usage
```python
from repominer.mining. import Miner
from repominer.metrics. import MetricsExtractor
miner = Miner(url_to_repo='github.com/adriagalin/ansible.motd', clone_repo_to='/tmp')
miner.get_fixing_commits()
miner.get_fixed_files()
failure_prone_files = miner.label()metrics_extractor = MetricsExtractor(path_to_repo='/tmp/ansible.motd')
metrics_extractor.extract(failure_prone_files, product=True, process=True, delta=True)
metrics_extractor.to_csv('metrics.csv')print('FIXING COMMITS:', miner.fixing_commits)
print('FAILURE-PRONE FILES:', failure_prone_files)
print('METRICS:', metrics_extractor.dataset.head())
```# How to test
```text
pip install pytest
unzip test_data.zip -d .
pytest
```