Merge branch 'remove-idfm-extra-references' into develop

This commit is contained in:
2023-01-23 21:09:20 +01:00
18 changed files with 12 additions and 12 deletions

View File

@@ -2,10 +2,10 @@
set -e set -e
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
CREATE USER idfm_matrix_bot; CREATE USER cer_user WITH ENCRYPTED password 'cer_password';
CREATE DATABASE bot; CREATE DATABASE cer_db;
CREATE DATABASE idfm; \c cer_db;
GRANT ALL PRIVILEGES ON DATABASE bot TO idfm_matrix_bot; CREATE EXTENSION IF NOT EXISTS pg_trgm SCHEMA "public";
GRANT ALL PRIVILEGES ON DATABASE idfm TO idfm_matrix_bot; GRANT CREATE ON SCHEMA public to cer_user;
EOSQL EOSQL

View File

@@ -8,10 +8,10 @@ from fastapi.responses import JSONResponse
from fastapi.staticfiles import StaticFiles from fastapi.staticfiles import StaticFiles
from rich import print from rich import print
from idfm_matrix_backend.db import db from backend.db import db
from idfm_matrix_backend.idfm_interface import IdfmInterface from backend.idfm_interface import IdfmInterface
from idfm_matrix_backend.models import Line, Stop, StopArea from backend.models import Line, Stop, StopArea
from idfm_matrix_backend.schemas import ( from backend.schemas import (
Line as LineSchema, Line as LineSchema,
TransportMode, TransportMode,
NextPassage as NextPassageSchema, NextPassage as NextPassageSchema,
@@ -24,7 +24,7 @@ API_KEY = environ.get("API_KEY")
# TODO: Add error message if no key is given. # TODO: Add error message if no key is given.
# TODO: Remove postgresql+asyncpg from environ variable # TODO: Remove postgresql+asyncpg from environ variable
DB_PATH = "postgresql+asyncpg://postgres:postgres@127.0.0.1:5438/idfm" DB_PATH = "postgresql+asyncpg://cer_user:cer_password@127.0.0.1:5438/cer_db"
app = FastAPI() app = FastAPI()

View File

@@ -1,10 +1,10 @@
[tool.poetry] [tool.poetry]
name = "idfm-matrix-widget" name = "carrramba-encore-rate"
version = "0.1.0" version = "0.1.0"
description = "" description = ""
authors = ["Adrien SUEUR <me@adrien.run>"] authors = ["Adrien SUEUR <me@adrien.run>"]
readme = "README.md" readme = "README.md"
packages = [{include = "idfm_matrix_backend"}] packages = [{include = "backend"}]
[tool.poetry.dependencies] [tool.poetry.dependencies]
python = "^3.11" python = "^3.11"