This repo is a git submodule. Thus changes made here will be reflected in external sources, which requires a certain workflow to ensure consistency for all developers who depend on this repo. Besides that it functions as any other repo.
To get started please make sure that the following pieces of software are installed on your machine.
- Docker
- Minikube
- Skaffold
- Python 3.10
- pipenv
- pre-commit
Setup local .env
Copy the contents of .env.example to a local .env file.
To get the ARTIFACTS_TOKEN_BACKEND_PACKAGES token for fetching python packages
from Azure Artifacts.
You can do it by creating a PAT that have read access to artifacts.
Install dependencies
# Set environment variables on linux
export ARTIFACTS_TOKEN_BACKEND_PACKAGES=<YOUR_PAT>
# Set environment variables on Windows
$env:ARTIFACTS_TOKEN_BACKEND_PACKAGES=<YOUR_PAT>
# Install packages
pipenv install --dev
# Install pre-commit hooks
pre-commit installSee more about Windows Env vars here Start dev server
# Start Minikube to run a local Kubernetes cluster
minikube start
# Run Skaffold
skaffold devRun tests locally
pytest tests/Make migration Skaffold should be running!
./local_migration.shExport GraphQL schema
./export_schema.shLoad EPD data into database
kubectl -n assembly exec -it $(kubectl -n assembly get pod -l app=backend -o name) -- python src/import_data/main.pyalembic/ # Contains migrations
graphql/ # Contains graphql schema for the gateway
helm/ # helm chart for deployment
src/ # source code
core/ # code related to FastAPI/webserver
exceptions/ # custom exceptions
models/ # database models
routes/ # api routes
schema/ # graphql schema definitions
tests/ # test code
Unless otherwise described, the code in this repository is licensed under the Apache-2.0 License. Please note that some modules, extensions or code herein might be otherwise licensed. This is indicated either in the root of the containing folder under a different license file, or in the respective file's header. If you have any questions, don't hesitate to get in touch with us via email.