This repository contains the web server to access the database information.
It will be used in combination with the original PaperScape server, in order to construct colored areas over the Dialect map UI interface, given the papers categorization over a pair of user specified jargon words frequencies.
Python dependencies are specified on the multiple files within the reqs directory.
In order to install all the development packages, as long as the defined commit hooks:
make install-devAll Python files are formatted using Black, and the custom properties defined
in the pyproject.toml file.
make checkProject testing is performed using Pytest. In order to run the tests:
make testThe project is currently designed to be deployed in a Google Cloud Platform project, so the initial step involves using gcloud CLI tool to log into it:
gcloud login
gcloud auth configure-dockerIn addition, macOS requires developers to have their identity keys added to the SSH agent
in order for Docker to pick up those keys when building the image with the --ssh default flag.
ssh-add -KTo build a Docker image out of the project:
make buildTo push a Docker image to the GCP registry:
export GCP_PROJECT="ds3-dialect-map"
export GCP_REGISTRY="us.gcr.io"
make pushThis project uses a set of env. variables to configure certain aspects of the API:
| ENV VARIABLE | DEFAULT | REQUIRED | DESCRIPTION |
|---|---|---|---|
| DIALECT_MAP_DB_URL | ... | No | Database connection URL |
| DIALECT_MAP_LOG_LEVEL | INFO | No | Log messages level |