=============
This is a project for creating a simple tournament database. The user will be able to register players for tournaments, report matches, check standings, and producess swiss pairings for future rounds of tournaments.
Contains:
- Code from lectures from Udacity Intro to Relational Databases
- Code for Project: Tournament Planner
- Refactored code to remove more repetition by adding updateDatabase() and readDatabase() methods
- Updated schema to include composite key for player / tournament pairs
- Removed creating standings in view since tournament_id was added to players schema instead
- Updated swissPairings method now uses the zip function for testing, no functionality changes
- Refactored code to remove repetition and added format() for queries to use tuples
- Updated tournament.sql to connect to tournament database so tables are not created in a separate database
- Updated tournament_test.py test cases to avoid deleting after every test case and now creates a new tournament to test instead
- Added a tournament table for storing tournaments
- Updated player and matches tables to reference a tournament id
- Updated tournament_test.py test suite for handling tourmanets
- Updated comments to reflect multiple tournament support
- Added more comments to code
- Finished logic for reading every other standing and pairing it to closest winner
- Created view for calculating standings using the player and matches tables
- Completed functions for inserting data into the database tables
- Created project and initial commit for tournament files
- Python 2.7 for running the tournament functions and tests
- PostgreSQL 9.3.8 or later for creating the database
- psycopg for connecting to the PostgreSQL database
- bleach for protecting against database attacks
- optional Vagrant for using a virtual instance to optimize workflows
- optional VirtualBox required if using Vagrant
- Download and unzip the project folder from here.
- Go to the vagrant folder and run
vagrant up
andvagrant ssh
. - Run
createdb tournament
in the command line to create a tournament database. - Run
psql -f tournament.sql && python tournament_test.py
which will create the database tables and run the provided test suite to test the database and code. - Run
psql tournament
in order to perform queries against the database.
- Hanwen Yan
- Udacity