add imdb full import mode

This commit is contained in:
ducklet 2021-06-21 18:54:03 +02:00
parent b5cb22822e
commit 7dd10f8bc3
17 changed files with 721 additions and 109 deletions

View file

@ -1,5 +1,7 @@
#!/bin/sh -eu
cd "$RUN_DIR"
[ -z "${DEBUG:-}" ] || set -x
exec python -m unwind "$@"

View file

@ -1,5 +1,7 @@
#!/bin/sh -eu
cd "$RUN_DIR"
[ -z "${DEBUG:-}" ] || set -x
exec uvicorn unwind:web_app --reload

18
scripts/load_imdb_dumps Executable file
View file

@ -0,0 +1,18 @@
#!/bin/sh -eu
datadir="$RUN_DIR"/data
[ -z "${DEBUG:-}" ] || set -x
# See
# - https://www.imdb.com/interfaces/
# - https://datasets.imdbws.com/
wget -N \
--no-directories \
--directory-prefix "$datadir" \
https://datasets.imdbws.com/title.basics.tsv.gz \
https://datasets.imdbws.com/title.ratings.tsv.gz
"$RUN_BIN" app import-imdb-dataset \
--basics "$datadir"/title.basics.tsv.gz \
--ratings "$datadir"/title.ratings.tsv.gz

View file

@ -1,5 +1,7 @@
#!/bin/sh -eu
cd "$RUN_DIR"
[ -z "${DEBUG:-}" ] || set -x
exec uvicorn --host 0.0.0.0 unwind:web_app

7
scripts/tests Executable file
View file

@ -0,0 +1,7 @@
#!/bin/sh -eu
cd "$RUN_DIR"
[ -z "${DEBUG:-}" ] || set -x
exec python -m pytest "$@"