GameHub is an API to make interesting website for video games and who love video games!
- Student 1. Sina Kiarostami, mohammad.kiarostami@oulu.fi
- Student 2. Sadaf Nazari, sadaf.3.nazari@student.oulu.fi
- Student 3. Vahid Mohsseni, vahid.mohsseni@oulu.fi
- Student 4. Danial Khoshkholgh, danial.3.khoshkholgh@student.oulu.fi
Remember to include all required documentation and HOWTOs, including how to create and populate the database, how to run and test the API, the url to the entrypoint and instructions on how to setup and run the client
Our database system and its entities and their relations has been explained in the wiki page. For this
implementation we used SQLite3
However, in this section, we will introduce the simple commands to run the project and initialize the DB.
We did not use the so-called ready to user database engines for three reasons.
- First, we wanted to keep the project as simple as possible for our learning purpose.
- Second, in the upcoming deadlines for the project we may have some complex sql queries.
- And the third, this was the fastest way we know when we were designing the project.
Before runing the project please install the requirement of the project available in the requirements.txt
file.
To init the database and populate it with some entities:
$ export FLASK_APP=API
$ export FLASK_ENV=development
$ flask init-db
The above command will run our database initializer using the already-defined schema which is available in the
directory databae/schema.sql
, and then to populate the DB with some pre-defined data, it will use the
database/data.sql
file. The instance file of the database, since we are using the sqlite is available in the
instance/db.sqlite
file.
To run the application on the port of 5000:
$ python3 app.py
You can access the API documentation by visiting the following url: http://localhost:5000/apidocs/
$ cd client
$ python cmd_client.py
********************************************************************************
***************************** WELCOME TO **************************************
***************************** THE **********************************************
***************************** GAME *********************************************
***************************** CLIENT *******************************************
***************************** **************************************************
********************************************************************************
1 - for login
2 - for signup
To test and see the coverage status, run the following commands:
$ coverage run -m pytest
$ coverage report