The Python script to generate locations data for the Locations API.
- Start the API which should be tested locally.
- copy
configuration-example.yaml as
configuration.yaml
and modify it as necessary.
-
Fetch contrib files with
git-submodule
:$ git submodule update --init
-
Install dependencies via pip:
$ pip install -r requirements.txt
-
Build the artifacts:
$ python build_artifacts.py --config=configuration.yaml
If the script runs successfully, the following two files will be generated in the
./build
directory:locations_combined.json
- Combined OSU locations list from various data sourcesservices.json
- OSU services data list
-
Update AWS Elasticsearch instance:
$ python es_manager.py --config=configuration.yaml
-
Build the docker image:
$ docker build -t locations-generator .
-
Run the app in a container:
$ docker run --name locations-generator \ --rm \ -v "$PWD"/configuration.yaml:/usr/src/app/configuration.yaml:ro \ -v "$PWD"/build:/usr/src/app/build \ locations-generator