This project contains all files necessary to the creation and management of a database designed to store , access and manipulate data for a tournament held in a swiss pairing mode.
- Install
- Getting Started with Udacity UD-197 course material
- What's Included
Tournament Database requires Python 2.7 or higher and postgre to be installed on your computer in order to be executed. Please make sure that Python 2.7 or higher is installed on your computer or download and install it.
Linux user should have a version of ython already installed. Please refer to appropriate distribution documentation and upgrade to a newer version if needed.
Please make sure that PostgreSQL is installed on your computer or download and install it following the instructions at:
Python 2.7 DB-API for PostgreSQL is psycopg2. Please refer to the following for download and installation on your system
The following instructions are for Udacity course UD-197 setup:
- Install Vagrant VM as descibed here
- Download the tournament project from GitHub
- extract it on your local machine. Keep all files in the same folder!
- Open a terminal (Mac, Linux) or Putty (Windows)
- Crawl to the VM folder
$ cd /home/../path_to_VM_folder/fullstack/vagrant
type
$ vagrant up
$ vagrant ssh
to launch your virtual machine andd log into it;
- Crawl to the project folder
$ cd /vagrant/tournament
Now you have three options
- type
$ python tournament_test.py
if you want to run the test file.
- create, connect to and interact with tournament database using PostgreSQL
$ psql
$ \i tournament
- Use psycopg2 and the functions defined by tournament.py:
$ python
$ from tournament import *
tournament/
|--tournament.py
|--tournament.pyc
|--tournament.sql
|--tournament_test.py
|--README.md
Marcello Scarnecchia