Metadata service for microdata.no.
To work on this repository you need to install poetry:
# macOS / linux / BashOnWindows
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -
# Windows powershell
(Invoke-WebRequest -Uri https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py -UseBasicParsing).Content | python -
Then install the virtual environment from the root directory:
poetry install
Open terminal and go to root directory of the project and run:
poetry run pytest --cov=metadata_service/
The API documentation is available at data-store-api-doc
You should add the appropriate environmental variables to your local system:
export DATASTORE_ROOT_DIR=/datastore
export DOCKER_HOST_NAME=<host name>
Open terminal and go to root directory of the project and run:
poetry run gunicorn metadata_service.app:app
docker build --tag metadata-service:local-latest .
docker run --publish 8080:8080 \
--rm \
--env DATASTORE_ROOT_DIR=/datastore \
--env PORT=8000 \
--env DOCKER_HOST_NAME=local \
-v /path/to/datastore:/datastore metadata-service:local-latest