A Flowkit query postprocessing, data management and authentication/authorisation component, designed for use with Flowminder/flowkit-ui.
The tool itself is containerised, so as long as you have Docker installed, it will take care of its own dependencies inside its container(s).
To build/run:
- Docker
- Make
To commit:
- pre-commit (for commit hooks)
Run the app via make
. The following command will give you an overview of available targets:
make
You can use the following targets:
deps
: Regenerate pinned requirements.txt filesbuild
: build a new docker image (i.e. use the latest API spec)test
: run all unit tests and produce a coverage reportrun
: start the image, using the implementation directory as a bind mount (i.e. changes will be reflected by the flask server on the next API call)
Access the API at http://localhost:5000. The API document can be viewed at http://localhost:5000/openapi.json.
If you need to add any dependencies, add them to src/impl/requirements.in
or src/impl/dev-requirements.in
and refer to the section above as the docker image will have to be rebuilt.
- API_VERSION
- API_VERSION_URL_APPENDIX
- GIT_BRANCH
- GIT_COMMIT
- GIT_TAG
- APP_NAME
- IMAGE_NAME
- DB_NAME
- DB_PORT_CONTAINER
- DB_PW
- DB_USER
- FLOWKIT_UI_URL
- CONTAINER_NAME_DB
- SERVER_PORT_HOST
- AUTH0_DOMAIN
- AUTH0_CLIENT_ID
- AUTH0_CLIENT_SECRET
- AUTH0_AUDIENCE
- DEV_MODE (default 0, set to 1 to enable)
- LOG_LEVEL (default to warning, default to debug if DEV_MODE=1)
- JUPYTER_ENABLED (default 0, set to 1 if using jupyter locally)
- JUPYTER_PORT