Removed references to dengfun

This commit is contained in:
Borrell.Guillem@bcg.com 2023-09-18 09:43:10 +02:00
parent c8447c6f50
commit ba4bcfc8d9
10 changed files with 20 additions and 20 deletions

View file

@ -3,7 +3,7 @@
Run the backend with
```bash
uvicorn dengfun.retail.api.main:app
uvicorn retailtwin.api.main:app
```
Use Caddy to reverse proxy and the following Caddyfile. Paths are static so you have to run caddy from the root of the package
@ -14,7 +14,7 @@ Use Caddy to reverse proxy and the following Caddyfile. Paths are static so you
reverse_proxy localhost:8000
}
file_server {
root src/dengfun/retail/api/static
root src/retailtwin/api/static
}
}
```

View file

@ -2,8 +2,8 @@ import os
from operator import itemgetter
from sqlalchemy.ext.asyncio import create_async_engine, async_sessionmaker, AsyncSession
from sqlalchemy import select, desc
from dengfun.retail.views import get_inventory_view, get_stores_view
from dengfun.retail.api.settings import Settings
from retailtwin.views import get_inventory_view, get_stores_view
from retailtwin.api.settings import Settings
async def get_session():

View file

@ -1,7 +1,7 @@
from fastapi import FastAPI, Request, Depends
from fastapi.responses import HTMLResponse
from sqlalchemy.ext.asyncio import async_sessionmaker, AsyncSession
from dengfun.retail.api.db import get_inventory, get_session, get_stores
from retailtwin.api.db import get_inventory, get_session, get_stores
app = FastAPI(root_path="/api/v1")

View file

@ -10,9 +10,9 @@ import polars as pl
from sqlalchemy import select
from sqlalchemy.orm import Session
import dengfun
from dengfun.retail.utils import db_uri_from_session
from dengfun.retail.models import (
import retailtwin
from retailtwin.utils import db_uri_from_session
from retailtwin.models import (
Discount,
Item,
ItemBatch,
@ -24,7 +24,7 @@ from dengfun.retail.models import (
)
# Some configuration parameters.
PACKAGE_ROOT = Path(dengfun.__file__).parent / "retail"
PACKAGE_ROOT = Path(retailtwin.__file__).parent / "retail"
PRODUCT_LIST_FILE = "data/products.csv"
DISCOUNT_LIST_FILE = "data/discounts.csv"
RANDOM_PEOPLE_FILE = "data/random_people.csv"

View file

@ -2,7 +2,7 @@ import typer
from sqlalchemy import create_engine
from sqlalchemy.orm import Session
from dengfun.retail.bootstrap import (
from retailtwin.bootstrap import (
bootstrap_clients,
bootstrap_discounts,
bootstrap_items,
@ -11,8 +11,8 @@ from dengfun.retail.bootstrap import (
bootstrap_stock,
bootstrap_taskowners,
)
from dengfun.retail.models import Base
from dengfun.retail.sql.sync import funcandproc
from retailtwin.models import Base
from retailtwin.sql.sync import funcandproc
app = typer.Typer()

View file

@ -3,9 +3,9 @@ Terminal that mimics what a Point of Sale may operate like.
"""
import typer
import polars as pl
from dengfun.retail.cli.db import query_local_batches
from dengfun.retail.cli.pos.models import Base, Sync, Direction, Cart, Item
from dengfun.retail.utils import db_uri_from_session
from retailtwin.cli.db import query_local_batches
from retailtwin.cli.pos.models import Base, Sync, Direction, Cart, Item
from retailtwin.utils import db_uri_from_session
from datetime import datetime
from sqlalchemy import create_engine, select

View file

@ -2,7 +2,7 @@
import typer
import polars as pl
from sqlalchemy import create_engine, text as query
from dengfun.retail.cli.db import query_warehouse_stock, df_to_table, fetch_from_db
from retailtwin.cli.db import query_warehouse_stock, df_to_table, fetch_from_db
from prompt_toolkit import PromptSession
from prompt_toolkit.completion import WordCompleter
from prompt_toolkit.shortcuts import clear

View file

@ -5,7 +5,7 @@ import polars as pl
from scipy.stats.distributions import lognorm
from sqlalchemy.orm import Session
from dengfun.retail.models import Cart
from retailtwin.models import Cart
def cart(session: Session) -> Cart:

View file

@ -1,9 +1,9 @@
from pathlib import Path
from sqlalchemy import create_engine, text
from sqlalchemy.orm import Session
import dengfun
import retailtwin
PACKAGE_ROOT = Path(dengfun.__file__).parent / "retail"
PACKAGE_ROOT = Path(retailtwin.__file__).parent / "retail"
def funcandproc(db_uri: str):

View file

@ -4,7 +4,7 @@ to existing views in the database. Make sure these views have been synced after
table creation.
"""
from dengfun.retail.models import Base
from retailtwin.models import Base
from functools import lru_cache
from sqlalchemy import Table, Column, Date, Integer, String, JSON