From 9574e191b8f34c6b74a9e47384e7b29872fd5799 Mon Sep 17 00:00:00 2001 From: Sahil D Shah Date: Thu, 19 Jun 2025 13:17:00 -0400 Subject: [PATCH] Update the README --- README.md | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 1f4e8f01..a9ef29cd 100644 --- a/README.md +++ b/README.md @@ -36,15 +36,28 @@ Tools used for development: ### Running Balancer for development -Running Balancer: -- Start Docker Desktop and run `docker compose up --build` -- The email and password are set in `server/api/management/commands/createsu.py` -- Download a sample of papers to upload from [https://balancertestsite.com](https://balancertestsite.com/) +Start the Postgres, Django REST, and React services by starting Docker Desktop and running `docker compose up --build` -Running pgAdmin: +#### Postgres +- Download a sample of papers to upload from [https://balancertestsite.com](https://balancertestsite.com/) - The email and password of `pgAdmin` are specified in `balancer-main/docker-compose.yml` -- The first time you use `pgAdmin` after building the Docker containers you will need to register the server. +- The first time you use `pgAdmin` after building the Docker containers you will need to register the server. The `Host name/address`, `Username` and `Password` are specified in `balancer-main/docker-compose.yml` +- You can use the below code snippet to query the database from a Jupyter notebook: + +``` +from sqlalchemy import create_engine +import pandas as pd + +engine = create_engine("postgresql+psycopg2://balancer:balancer@localhost:5433/balancer_dev") + +query = "SELECT * FROM api_embeddings;" + +df = pd.read_sql(query, engine) +``` + +#### Django REST +- The email and password are set in `server/api/management/commands/createsu.py` ## Architecture