- The project's purpose
- What tools were used to create this project
- Before you begin
- how to run the project
- how to run tests
- Final step
The purpose of this project is to leverage the Movielens 20M Dataset from Movielens as its primary data source. It aims to provide a range of APIs for efficient data access and manipulation.
Technology | π |
---|---|
django v.5 | [Github Link] |
django REST | [Github Link] |
django-filter | [Github Link] |
Simple JWT | [Github Link] |
drf-yasg | [Github Link] |
asyncio | [Github Link ] |
pandas | [Github Link] |
poetry | [Github Link] |
docker | [Github Link] |
docker-compose | [Github Link] |
pytest | [Github Link] |
coverage | [Github Link] |
mypy | [Github Link] |
Before you begin, please follow these steps:
- Create a folder named
datasets
in theroot
directory. - Download and extarct the ml-20m dataset in the
datasets
directory.
It should look like this:
βββ datasets
β βββ ml-20m
β βββ links.csv
β βββ movies.csv
β βββ tags.csv
Navigate to the root of the project.
To build the image from the Dockerfile, run:
docker compose up --build -d
Or, there's a Makefile
for your convenience, so just run: (Check other commands too!)
make run
Now, you can check the Swagger URL for API documentation.
http://127.0.0.1:8000/swagger/
π Now, you need to load the ml-20m
dataset in to the database.
make load_data
Or, If you want to run the project locally, you need to have poetry
installed first.
pip install poetry
poetry install
poetry run python manage.py runserver 0.0.0.0:8000
poetry run python manage.py load_datasets
Run pytest command to run the tests separately.
make tests
And, what about Test Coverage?
make coverage
# Backend Directory Stmts Miss Cover
# -----------------------------------------------------
# Test Coverage TOTAL 255 30 88%
π This project has been thoroughly checked with mypy
for type consistency, and it currently passes all mypy checks without any issues.
make mypy
make coffee