virtualenv -p python3 venv-p #Set the python version virtualenv need to usevenv #The name of virtual environmentFor this step you need instaled all items in Requirements and create a virtual environment using virtualenv
- Active virtual environment
-
For this we gonna to use the source command on linux
source venv/bin/activate
After this step the name of virtual environment will appear first on the terminal linux path like this.
(venv)[root@localhost ~]#
- Install Python requirements from the requirements.txt using the following command
Now we have installed all requirements to run the tool
pip install -r requirements.txt
If you need exit of virtualenv environment use this command.
deactivateWith all requirements installed is time to prepare tool for run
- The first step is create and initialize database
python configInit.py
After this step the tool is able to interact by command line or web interface
The simplest interaction form to the tool with the tool, The command line allow 8 operations
python config.py --projects projects.jsonwhere need a json formatted
python config.py --projectspython config.py --keys keys.jsonwhere need a json formatted
python config.py --keyspython config.py --finishedpython config.py --statusstatus: ON/OFF projects in database completed projects GitHub keys on in database
To activate the Web Interface use this command.
python configWeb.pyThe interface run in
http://localhost:5000/projects CRUD can be found here
http://localhost:5000/projectsGitHub keys CRUD can be found here
http://localhost:5000/keysCan you use command
python extractDataset.pyto extract all repositories metrics of database each to .csv file in ./results in project directory for compatibility was used # instead of / in file name for each repository file then owner/repo now owner#repo
The field visited is True only if the project is completed Example json for one project
{
"visited":false,
"name":"owner/repo"
}Example json for many project
[
{"visited":false,"name":"owner/repo"},
{"visited":false,"name":"owner/repo"},
{"visited":false,"name":"owner/repo"},
{"visited":false,"name":"owner/repo"}
]Example json for one project
{
"client_id":"xxxxxxxxxxxxxxxxxxx",
"client_secret":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}Example json for many project
[
{
"client_id":"xxxxxxxxxxxxxxxxxxx",
"client_secret":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
},
{
"client_id":"xxxxxxxxxxxxxxxxxxx",
"client_secret":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
},
{
"client_id":"xxxxxxxxxxxxxxxxxxx",
"client_secret":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
},
{
"client_id":"xxxxxxxxxxxxxxxxxxx",
"client_secret":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
]