Skip to content

PJWSTK-Data-Science-Dojo/embedded-rift

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

90 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Embedded Rift

Project Setup

Prerequisites

To run this project, you need the following API keys:

  • OpenAI API Key: Obtain an API key by signing up at OpenAI.
  • Riot API Key: Obtain an API key by signing up at Riot Games Developer Portal.
  • Docker & Docker-Compose:
    • Docker: Required to run MongoDB in a containerized environment. Download and install it from Docker Desktop.
    • Docker-Compose: A tool for defining and running multi-container Docker applications. It usually comes with Docker but if needed, install it separately by following Docker-Compose Installation.
  • Mongo Tools: Mongo Tools Download .msi

Once you have the keys, add them to the .env file as follows:

OPENAI_API_KEY=your_openai_api_key_here
RIOT_API_KEY=your_riot_api_key_here
MONGO_URI=

1. Create a Virtual Environment

# Windows command line
python -m venv .venv
.venv\Scripts\activate

# Windows Git Bash
python -m venv .venv
source .venv/Scripts/activate

# MacOS, Linux and Git Bash
python -m venv .venv
source .venv/bin/activate

2. Install Required Dependencies

pip install -r requirements.txt

3. Configure Enviroment Variables

cp .env.example .env

4. Set the Python Package Path

You can temporarily set the PYTHONPATH to include the src directory. This ensures that Python knows where to find your modules. For Windows:

set PYTHONPATH=src

For MacOS, Linux and GitBash:

export PYTHONPATH=src

Optional (Not Recommended): Add PYTHONPATH Permanently

You can permanently add the src directory to your Python path in your shell configuration file:

export PYTHONPATH=$PYTHONPATH:/path/to/src

5. Add Data and Visualization Catalogs

mkdir data
mkdir viz

6. Run the Script

Test the setup by running one of the scripts:

python src/scripts/test.py

7. Setup MongoDB with Docker

The project includes a docker-compose.yml file that sets up MongoDB.

7.1 Start MongoDB

Run the following command in the project root:

docker-compose up -d

7.2 Import Database Backup

You need to download the backup file (games_mongo.gz) and import it into MongoDB.

  1. Copy games_mongo.gz into the project root directory.
  2. Run the following command to restore the database:
mongorestore --gzip --archive=/games_mongo.gz --nsInclude=embedded-rift.games

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •