#Swiss Tournament Generator
First of all, you must install some software in your computer:
Installation Git docs | download | Virtual Box docs | download| Vagrant docs | download
Steps:
- Open terminal:
- Windows: Use the Git Bash program (installed with Git) to get a Unix-style terminal.
- Other systems: Use your favorite terminal program.
- Change to the desired parent directory
- Example:
cd Desktop/
- Using Git, clone the VM configuration:
- Run:
git clone http://github.com/udacity/fullstack-nanodegree-vm fullstack - This will create a new directory titled fullstack that contains all of the necessary configurations to run this application.
- Move to the vagrant folder by entering:
cd fullstack/vagrant/ - Using Git, clone this project:
- Run:
git clone https://github.com/JaviMelo/tournament.git tournament - This will create a directory inside the vagrant directory titled tournament.
-
Run Vagrant by entering:
vagrant upUsage:
Once the installation steps are complete, you are ready to connect to the Vagrant box. To connect:
- Log into Vagrant VM by entering:
vagrant ssh - Move to tournament directory by entering:
cd /vagrant/tournament/ - Create the tournament database by entering:
psql -f tournament.sql
Note: You can run
psql -f tournament.sqlat anytime to completely delete the database and start over.
- If you would like to test the database against Udacity's criteria, enter:
python tournament_test.py
Note: To clear the database after running tournament_test.py, you can either call the deletePlayers() and deleteMatches() functions or refer to step 3.
- Launch Python command line by entering
python - Import tournament by entering:
import tournament - Execute a desired function.
Enjoy!