A project for extracting issues from GitHub for my Ph.D. research
First, navigate to your project's root directory in your terminal. Then, create a virtual environment named venv (or another name of your choice) by running:
python -m venv venv
This command creates a new directory named venv in your project directory, which contains a copy of the Python interpreter, the standard library, and various supporting files.
Before you can start installing packages, you need to activate the virtual environment. Activation will ensure that the Python interpreter and tools within the virtual environment are used in preference to the system-wide Python installation.
- On macOS and Linux:
source venv/bin/activate
- On Windows (cmd.exe):
.\venv\Scripts\activate.bat
- On Windows (PowerShell) or VSC Terminal:
.\venv\Scripts\Activate.ps1
Once activated, your terminal prompt must change to indicate that the virtual environment is active.
With the virtual environment activated, install the required packages. Ensure you have the following installed in your Python environment. If not, you can install them using pip:
pip install requests
pip install bs4
pip install python-dotenv
pip install colored
pip install psycopg2-binary
Copy and paste the template.env
file and rename the new file to .env
.
Edit the .env
file as following:
-
Make a Personal Access Token and copy and paste the token as
PAT_KEY
.To generate your Github personal access token:
- Visit the Personal Access Tokens ↗ section on Github
- Click on Generate new token
- Fill in the token name, expiry and resource owner
- Carefully review and grant the necessary fine grained permissions to your token
- Use the generated token here
-
Make sure that you sellect the right DBMS type. If you want Sqlite the keep
SQLITE
otherwise if you want Postgres keepPOSTGRES
-
DB_PATH
is needed for Sqlite and otherDB_*
attributes are needed for Postgres databases.
Run the main.py
file to run the program.
python main.py