Giter Site home page Giter Site logo

fullstack-nanodegree-vm's Introduction

Tournament

=============

Description

In this project, a database schema was created, i.e. using a Python module that uses PostgreSQL, to store tournament matches between players -- Swiss system style. In a Swiss system tournament, players are not eliminated in each round, rather they are systematically paired with another player with the same number of wins. After creating the database schema (SQL file), a separate file (python module) was used to query the tables to report winners and matches of each round.

Necessary files

Starter codes are provided for this project and must be forked from Udacity's fullstack-nanodegree-vm reposistory. Once cloned into your local machine, you will find the following files(3):

  • tournament.sql : a file used to create tables
  • tournament.py : a file used to manipulate data in the database in Python
  • tournament_test.py : a file containing test cases to test implementation of functions in tournament.py

Most importantly, to successfully run the tournament.sql file, make sure you delete the database if it exists, create the database, then connect to it.

How to setup environment

In order to successfully run the application, the Vagrant virtual machine must be set up properly. This includes installing Vagrant and Virtual Box.

How to execute tests?

In the vagrant environment:

  1. Navigate to 'cd /vagrant/tournament'
  2. Enter psql -f tournament.sql to fetch the tournament databse schema.
  3. Open another tab on the terminal.
  4. Execute the command 'python tournament_test.py' to test the methods.
  5. Test results should print sucessfully on the screen.

fullstack-nanodegree-vm's People

Contributors

forbiddenvoid avatar isemona avatar karlud avatar lobrown avatar pmallory avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.