Welcome to the Sherlock project. Sherlock is a movie recommendation microservice written in Flask.
The steps below can be executed on any Unix-like system. I will use Ubuntu deployed on O'Reilly's sandbox (alternatively, you could use Katacoda's playground). Once the sandbox/playground is ready, execute the instructions specified in the sections below.
This step is an option and can be omitted.
Create ssh key and add it to GitHub's SSH keys settings.
ssh-keygen
cat ~/.ssh/id_rsa.pub
# Cloning the source code
git clone https://github.com/ldynia/flask-sherlock.git
cd flask-sherlock
# Building and running the docker container
docker build --tag flask-sherlock --build-arg FLASK_DEBUG=True .
docker run --detach --name sherlock --publish 80:8080 --rm flask-sherlock
docker ps
Filter up algorithm
curl "http://localhost/api/v1/movies/recommend?title=Kingpin"
curl "http://localhost/api/v1/movies/recommend?title=Lost%20in%20Translation"
Unit test
docker exec sherlock pytest
Code coverage
docker exec sherlock coverage run -m pytest
docker exec sherlock coverage report
Stop container
docker stop sherlock