virtualenv -p python3 venv
-p #Set the python version virtualenv need to use
venv #The name of virtual environment
For 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.
deactivate
With 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.json
where need a json formatted
python config.py --projects
python config.py --keys keys.json
where need a json formatted
python config.py --keys
python config.py --finished
python config.py --status
status: ON/OFF projects in database completed projects GitHub keys on in database
To activate the Web Interface use this command.
python configWeb.py
The interface run in
http://localhost:5000/
projects CRUD can be found here
http://localhost:5000/projects
GitHub keys CRUD can be found here
http://localhost:5000/keys
Can you use command
python extractDataset.py
to 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"
}
]