This project allows you to evaluate GitHub repositories based on various metrics, such as the number of commits, code size, duration of the repository's existence, and other parameters. The evaluation is performed using a linear regression model that is trained on the collected data.
- Evaluate a repository based on the following parameters:
- Number of commits
- Code size (in MB)
- Duration of the repository's existence (in days)
- Number of open issues
- Number of pull requests
- Number of stars
- Number of forks
- Number of branches
- Train the model based on the collected data
- Support for environment variables for confidential information (GitHub token)
.
├── app.py
├── data_service.py
├── github_service.py
├── model.py
├── repo_data.csv
├── requirements.txt
└── .env
-
Clone the repository:
git clone https://github.com/timkmit/repo-evaluatecd repo-evaluate -
Install the required dependencies:
pip install -r requirements.txt -
Create a
.envfile in the root directory of the project and add your GitHub token:GITHUB_TOKEN=your_github_token -
Run the application:
python app.py
Send a POST request to /evaluate with a JSON body containing the username and repository name:
{
"username": "username",
"repo_name": "repository_name"
}Send a POST request to /predict with the same data to obtain the predicted score:
{
"username": "username",
"repo_name": "repository_name"
}