docker-compose up
cd data
python generate_test_data.py -n 300 test_data.csv
docker-compose exec app python3.7 manage.py upload -v 1 data/works_metadata.csv
docker-compose exec app python3.7 manage.py upload -v 1 data/test_data.csv
- Postgres is exposed at
localhost:5432
, credentials can be found indocker-compose.yml:postgres
env variables - Django app is exposed at
localhost:8000
2.1. Django admin page: http://localhost:8000/admin
, credentials can be found in docker-compose.yml:app
env variables
2.2. REST endpoints, no authorization:
list all works, with pagination:
curl -X GET http://localhost:8000/works/all/ -H "Accept: application/json"
select work by ISWC:
```
curl -X GET http://localhost:8000/works/work/T9204649558 -H "Accept: application/json"
```
- Stop docker-compose (or
docker-compose down
if you run in detached mode) docker-compose rm -f app postgres
Records are clustered at the moment of inserting new record. We just search
- records with the same ISMC (ther should be not more than one of such);
- records with the same title that have any commont contributor
Than all contributors from these records are added to new instance, and the records are delete. Thus, only one record is left.