Skip to content

Commit

Permalink
Leaderboard backend (#63)
Browse files Browse the repository at this point in the history
* feat: moved advent folder -> puzzles, added some comments

* feat(docker): start separation of dev and prod builds, add pytest functionality to backend

* feat(docker): added dev/prod to frontend, transition frontend to yarn

* fix: remove .vscode folder

* fix(makefile): restructured makefile a bit

* feat: removed .vscode folder from git

* feat(auth): get rudimentary autotesting in place, created clear_database function

* feat(test): added all tests for auth/register

* fix(puzzle): changed blueprint in routes/puzzle.py

* feat(auth): refactored registration system, database connections

* fix(auth): minor changes to constructor

* feat(auth): implement email verification endpoints

* feat(test): using fixtures

* feat(auth): finish autotests, still needs commenting

* feat(auth): finished writing tests for the most part

* feat(auth): complete tests for basic auth system

* fix(auth): removed duplicate clear_database function

* fix(auth): add basic lockout functionality

* update

* fix(auth): fix clear_database utility function

* leaderboard database complete no trigger

* fix(auth): change requests to conform with DB

* leaderboard backend complete no trigger

* fix(auth): add basic lockout to /login route

* leaderboard trigger implemented

* more triggers implemented on parts, questions, etc.

* almost done leaderboard tests

* leaderboard tests complete, besides jwt passing

* I have lost my sanity

* finished all but tests failing because mail not working

* updat

* removed useless puzzle test

* puzzle tests infinite loop, smtp

* first test leaderboard passing

* all tests uncommented but frozen on second

* finished all leaderboard and puzzle, puzzles not fully tested for 7 days (only 1 day)

Co-authored-by: Hanyuan Li <[email protected]>
Co-authored-by: Alice Wan <[email protected]>
  • Loading branch information
3 people authored Aug 11, 2022
1 parent 47db08e commit 2d2a3bc
Show file tree
Hide file tree
Showing 25 changed files with 10,579 additions and 9,557 deletions.
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,9 @@ restart:

test-backend:
docker-compose exec backend pytest . $(args)

test-puzzle:
docker-compose exec backend pytest -vv -s ./test/puzzle $(args)

test-leaderboard:
docker-compose exec backend pytest -vv -s ./test/leaderboard $(args)
22 changes: 11 additions & 11 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"

[packages]

[dev-packages]

[requires]
python_version = "3.8"
[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"

[packages]

[dev-packages]

[requires]
python_version = "3.8"
505 changes: 316 additions & 189 deletions backend/Pipfile.lock

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions backend/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from database.database import db
from routes.auth import auth
from routes.puzzle import puzzle
from routes.leaderboard import leaderboard
from routes.user import user


Expand Down Expand Up @@ -61,6 +62,7 @@ def create_app():
# Register smaller parts of the API
app.register_blueprint(auth, url_prefix="/auth")
app.register_blueprint(puzzle, url_prefix="/puzzle")
app.register_blueprint(leaderboard, url_prefix="/leaderboard")
app.register_blueprint(user, url_prefix="/user")

# Register our error handler
Expand Down
Loading

0 comments on commit 2d2a3bc

Please sign in to comment.