Skip to content

PolarGeospatialCenter/cloud-screening-tool

Repository files navigation

Cloud screening tool

How it works


Users upload a file containing Digital Globe catalog IDs separated by newlines. For each new catalog ID, a job is created so that the so that a low resolution image is later retrieved via Maxar's API. The image retrieval job is
processed by a background worker.

Local development

Create a .env file with the following environment variables: CLIENT_ID, CLIENT_SECRET, MGP_USERNAME, MGP_PASSWORD

  • You will need to update the values for CLIENT_ID and CLIENT_SECRET
    • These will need to be retrieved from keycloak
  • You will need to also update the values for MGP_USERNAME and MGP_PASSWORD
    • This requires an account with Maxar. You can register for one by going to https://xpress.maxar.com/ and clicking on the 'register' button If you have docker installed you can run docker compose build to build the image, then docker compose up -d to run the app
  • See the comments in the docker-compose.yml file regarding the bootstrapping process, this is needed in order to initialize the database

Database Migrations

You will need to edit the model(s), then run flask db migrate -m "migration_message", which will then generate a migration file under the migrations folder. Please review this file and make any edits as necessary, then run flask db upgrade. See the docker-compose.yml file for more details

Running a database migration in production

  • ssh to the host and cd to the app directory cd /path/to/app
  • load the environment variables needed for flask to run:
set -o allexport
source /path/to/app.conf
set +o allexport
  • run the migration flask db upgrade

Auth

The application uses keycloak for auth, and requires that the user has the 'authorized_user' client role. Within keycloak you will need to define a custom mapper with a "User Client Role" mapper type and "Token Claim Name" set to "client_roles"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published