miroesli / emoj

Virtual board game framework to create and play any board game

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Emoj

CircleCI

A virtual board game engine for the Seng 499 design project course by Emily, Misha, Oleg, and Juan.

Requirements

Presentation

Project #37 in the Virtual Open House of UVic 499 Course Projects

Running locally

Step 1: Clone or fork the repository and change current directory

git clone https://github.com/miroesli/emoj.git
cd emoj

Step 2: Install python3 and header files

sudo apt install python3 python3-dev

Step 3: Install postgres 12

sudo apt install postgresql postgresql-contrib

Step 4: Get python packages

python -m pip install -r requirements.txt

Consider using virtualenv (Optional)

Install virtualenv

pip3 install virtualenv

Create an env directory for python3

virtualenv -p python3 env

Enable the virtualenv

On Linux

source env/bin/activate

On Windows

env\Scripts\activate.bat

Use deactivate to stop exit the environment

Step 5: Create the database

sudo -u postgres psql -f project/sql/init.sql
psql -U toggleme -d project -f project/sql/create.sql
psql -U toggleme -d project -f project/sql/test_data.sql

Step 6: Run the server

python manage.py makemigrations && python manage.py migrate
python3 project/manage.py runserver 8000

Step 7: View Application

Access the server in browser at http://localhost:8000

Create User

Run createsuperuser with manage.py

python manage.py createsuperuser

Runnning in Docker

Requirements

Execution

Build and run server. -d puts it into the background.

docker-compose up [-d] --build --remove-orphans

Migrating data in another terminal

sudo docker-compose exec web python project/generate_cards.py
sudo docker-compose exec web python manage.py migrate --no-input

To connect to docker database

docker-compose exec db psql -U postgres -d task_management

To remove mapping

docker-compose down --volumes
docker-compose rm db

Testing

Change directory to the project module

cd emoj/project

Run the test using manage.py

python manage.py test

Alternatively to specify which test files

python manage.py test --pattern="tests_*.py"

Circleci

To test circleci script see the circleci local installation docs

❤️ Credits & Thanks

  • Dr Miguel Nacenta for guiding us in our design decisions.

About

Virtual board game framework to create and play any board game


Languages

Language:HTML 45.9%Language:Python 44.6%Language:CSS 6.7%Language:Dockerfile 2.2%Language:Shell 0.6%