-
Notifications
You must be signed in to change notification settings - Fork 5
Setting up your local environment
If you don't already have docker setup, follow the instructions provided here.
docker compose
utility is needed to execute the make commands, as the local application requires multiple containers to run simultaneously. Learn more about docker compose here. To install docker compose
follow the instructions provided here.
The applications are supported on python versions 3.11 or higher.
Utilities like pyenv can be used for managing multiple python environments.
The following should create a virtual environment with the current version of python. You learn more about virtual environments here.
From the parent folder, run make on api-init
.
make api-init
This should start up the local postgres database on port 5432
, and the GraphQL API server on port 8080
, and a local graphql's admin console on 9695
.
The local database is seeded with some initial data that you can explore, and play around with it by going to http://localhost:9695/
The gq command line tool is very helpful for interacting with remote graphql servers. Installation instructions can be found here.
Once installed, you can interact with the production graphql server by following command:
gq https://graphql-cryoet-api.cryoet.prod.si.czi.technology/v1/graphql -i
The ingestion tool uses poetry to manage its dependencies. First, install poetry in your virtual environment.
The following is a code snippet to install poetry in a virtual environment created by venv:
python3 -m venv $VENV_PATH
$VENV_PATH/bin/pip install -U pip setuptools
$VENV_PATH/bin/pip install poetry
Inside the ingestion_tools directory, run the poetry install
command to install all the required dependencies.
cd ingestion_tools
poetry install