Skip to content

lcacollect/project-backend

Repository files navigation

Introduction

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.

Getting Started

To get started please make sure that the following pieces of software are installed on your machine.

Software dependencies

Windows

Linux

Getting the backend up and running

Setup local .env Copy the contents of .env.example to a local .env file.

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 install

See more about Windows Env vars here

Start dev server

Remember to source the .env file before starting Skaffold To set the content of the .env file as env vars run export $(grep -v '^#' .env | xargs)

# Start Minikube to run a local Kubernetes cluster
minikube start

# Set ENV
export $(grep -v '^#' .env | xargs)

# Run Skaffold
skaffold dev

Run tests locally

pytest tests/

Make migration Skaffold should be running!

./local_migration.sh

Export GraphQL schema

./export_schema.sh

Folder Structure

alembic/  # 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

License

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.

About

API for the Project module

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors 7

Languages