From a495f8927fa46824c9ea26cfb18f9b71fdc116b1 Mon Sep 17 00:00:00 2001 From: Felipe Souza Date: Thu, 21 Nov 2024 01:39:04 -0300 Subject: [PATCH] Updated README.md and Makefile --- Makefile | 2 ++ README.md | 37 ++++++++++++++++++++++++++++++++++++- 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 5e501e6..94b788e 100644 --- a/Makefile +++ b/Makefile @@ -52,6 +52,8 @@ help: @echo " |_ makemigrations - Create migrations" @echo " |_ stop - Stop the docker containers" @echo " |_ test - Run the tests" + @echo " |_ cov - Run the tests with coverage" + @echo " |_ cov-report - Check the coverage report" @echo " |_ statics - Collect statics (useful to use the admin site)" @echo " |_ createsuperuser - Create super user to access the admin" @echo " |_ bash - Run the bash inside the container" diff --git a/README.md b/README.md index 00322b8..fbabbc0 100644 --- a/README.md +++ b/README.md @@ -102,4 +102,39 @@ You can check the live game here: [Minesweeper](https://minesweeper-web-eight.ve "column": 3 } ``` - \ No newline at end of file + +* GET `/api/leaderboard/`: List all leaderboards + +By default, it returns the 10 leaders for each mode. +you can pass the query param `size` to change the number of leaders returned + +## Tests +The project was developed using tests. You can run them with the following commands: +`make test` or `make cov` and check the coverage report with `make cov-report` + +## Coverage Report + +``` +Name Stmts Miss Cover Missing +--------------------------------------------------------------- +core/__init__.py 0 0 100% +core/admin.py 8 0 100% +core/apps.py 4 0 100% +core/constants.py 6 0 100% +core/migrations/0001_initial.py 6 0 100% +core/migrations/__init__.py 0 0 100% +core/models.py 50 0 100% +core/serializers.py 50 0 100% +core/services.py 91 0 100% +core/tests/__init__.py 0 0 100% +core/tests/test_models.py 23 0 100% +core/tests/test_views.py 151 0 100% +core/urls.py 6 0 100% +core/views.py 39 0 100% +manage.py 11 2 82% 13-14 +minesweeper/__init__.py 0 0 100% +minesweeper/settings.py 26 0 100% +minesweeper/urls.py 3 0 100% +--------------------------------------------------------------- +TOTAL 474 2 99% +``` \ No newline at end of file