A web interface for the LSST DESC Data Registry, providing an easy way to query and explore the datasets in the registry. This application is built with Flask and runs in Docker containers for easy deployment and development.
This application provides:
- A web-based query builder for searching the data registry
- Pre-built queries for common data exploration tasks
- Results display with support for large datasets
The application consists of two main components:
- Web Server: A Flask application that serves the web interface and handles queries
- Database: A PostgreSQL database (the
dataregistry)
-
Clone this repository:
git clone git@github.com:LSSTDESC/dataregistry-webapi.git cd dataregistry-webapi -
Start the Docker containers:
docker-compose up -d
This will:
- Build the Flask application container
- Start the PostgreSQL database container
- Configure networking between the containers
- Make the web application available on http://localhost:5000
-
To stop the containers:
docker-compose down
The application is configured to run in development mode by default, which includes:
- Live reloading of code changes
- Detailed error messages
- Flask debugging enabled
Once the application is running, navigate to http://localhost:5000 in your web browser.
- Navigate to the Query Builder page
- Select tables and columns to query
- Add filters by specifying conditions
- Select columns to display in results
- Submit the query to see results
- Navigate to the Production Datasets page
- Browse the categories of available queries
- Select a query to run
- View the results and optionally modify the query
For now the dataregistry config file is baked into the Dockerfile. You will have to alter this for your needs.
Pre-built queries are defined in the static/production_datasets.yaml file. Each query includes:
- A title and description
- The tables and columns to query
- The filters to apply
- The columns to display in results
- Flask: Web framework
- lsstdesc-dataregistry: Python library for interacting with the LSST DESC Data Registry
If the web application cannot connect to the database:
-
Check that both containers are running:
docker-compose ps
-
Check the database logs:
docker-compose logs database
-
Verify the database is healthy:
docker-compose exec database pg_isready -U postgres