{"id":15690176,"url":"https://github.com/laudep/swiss-tournament-planner","last_synced_at":"2026-04-24T16:40:01.977Z","repository":{"id":105119027,"uuid":"80576350","full_name":"laudep/swiss-tournament-planner","owner":"laudep","description":"Project for Udacity Nanodegree: A Swiss-sytem tournament planner using Python and a PostgreSQL database.","archived":false,"fork":false,"pushed_at":"2017-02-01T11:17:44.000Z","size":31,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-30T12:16:20.874Z","etag":null,"topics":["postgresql","python"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/laudep.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-02-01T00:27:44.000Z","updated_at":"2018-12-23T22:22:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"9b39148b-8f18-4d64-8109-a6f2de9c68cd","html_url":"https://github.com/laudep/swiss-tournament-planner","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/laudep/swiss-tournament-planner","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laudep%2Fswiss-tournament-planner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laudep%2Fswiss-tournament-planner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laudep%2Fswiss-tournament-planner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laudep%2Fswiss-tournament-planner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/laudep","download_url":"https://codeload.github.com/laudep/swiss-tournament-planner/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laudep%2Fswiss-tournament-planner/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32231603,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T13:21:15.438Z","status":"ssl_error","status_checked_at":"2026-04-24T13:21:15.005Z","response_time":64,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["postgresql","python"],"created_at":"2024-10-03T18:08:08.438Z","updated_at":"2026-04-24T16:40:01.955Z","avatar_url":"https://github.com/laudep.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Swiss-system Tournament Planner\n\nPlan a [Swiss-sytem tournament](https://en.wikipedia.org/wiki/Swiss-system_tournament) and keep track of players and matches using [Python](https://www.python.org/) and a [PostgreSQL](https://www.postgresql.org/) database.\n\n## About project\nThis project was made as a submission for a [Udacity](http://www.udacity.com) Nanodegree program.  \nA [Udacity supplied Vagrant VM](https://github.com/udacity/fullstack-nanodegree-vm) was used (Ubuntu, PosgreSQL and PostgreSQL CLI preconfigured).\n\n## Requirements\n1. [Python](https://www.python.org/)\n2. [PostgreSQL](https://www.postgresql.org/)\n\n## Project Files\n* tournament.sql: database schema\n* tournament.py: function library for database access\n* tournament_test.py: client program for testing functions in tournament.py module\n\n## Setup\nDownload the project files to your system of choice and import the database schema into PostgreSQL.  \n_**WARNING**: The schema will overwrite existing databases named \"tournament\"._\n\nSteps using [the Vagrant VM described above](https://github.com/udacity/fullstack-nanodegree-vm):  \nAfter running the VM open up a terminal in the project directory.  \nAccess the PostgreSQL database server and load the database schema: \n```\n$ psql -f tournament.sql\n```\nTo run the unit tests, quit PostgreSQL:\n```\n$ \\q\n```\nthen run the tournament_test python script:\n```\n$ python tournament_test.py\n```\n\nWhen you see the following results, you're ready to organize a tournament:\n\n```\n1. Old matches can be deleted.\n2. Player records can be deleted.\n3. After deleting, countPlayers() returns zero.\n4. After registering a player, countPlayers() returns 1.\n5. Players can be registered and deleted.\n6. Newly registered players appear in the standings with no matches.\n7. After a match, players have updated standings.\n8. After one match, players with one win are paired.\nSuccess!  All tests pass!\n```\n\n\n## Database contents\n\n**TABLE: PLAYERS**  \nContents: player ID and name.\n\n**TABLE: MATCHES**  \nContents: match results: match ID, winner and loser ID\n\n**VIEW: STANDINGS**  \nContents: matches played by each player sorted by amount of wins.\n\n## Tournament functions\n\nThe function library contains the following functions for organising a tournament:\n\nFUNCTION | INPUT | OUTPUT\n--- | --- | ---\nconnect() | | _database connection_\ndeleteMatches() | | None - removes all the match records from the database\ndeletePlayers() | | None - removes all the player records from the database\ncountPlayers() | | _number of currently registered players_\nregisterPlayer(name) | _name (string)_ | None - adds player to the tournament database (bleached)\nswissPairings() | | _List of tuples, each of which contains pair of players for next round (id1, name1, id2, name2)_\nreportMatch(winner, loser) | _winner ID_, _loser ID_ | None - records the outcome of a single match\nplayerStandings() | | _list of players and their win records, sorted by wins_\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaudep%2Fswiss-tournament-planner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flaudep%2Fswiss-tournament-planner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaudep%2Fswiss-tournament-planner/lists"}