Removed references to dengfun
This commit is contained in:
parent
c8447c6f50
commit
ba4bcfc8d9
|
@ -3,7 +3,7 @@
|
||||||
Run the backend with
|
Run the backend with
|
||||||
|
|
||||||
```bash
|
```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
|
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
|
reverse_proxy localhost:8000
|
||||||
}
|
}
|
||||||
file_server {
|
file_server {
|
||||||
root src/dengfun/retail/api/static
|
root src/retailtwin/api/static
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
|
@ -2,8 +2,8 @@ import os
|
||||||
from operator import itemgetter
|
from operator import itemgetter
|
||||||
from sqlalchemy.ext.asyncio import create_async_engine, async_sessionmaker, AsyncSession
|
from sqlalchemy.ext.asyncio import create_async_engine, async_sessionmaker, AsyncSession
|
||||||
from sqlalchemy import select, desc
|
from sqlalchemy import select, desc
|
||||||
from dengfun.retail.views import get_inventory_view, get_stores_view
|
from retailtwin.views import get_inventory_view, get_stores_view
|
||||||
from dengfun.retail.api.settings import Settings
|
from retailtwin.api.settings import Settings
|
||||||
|
|
||||||
|
|
||||||
async def get_session():
|
async def get_session():
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from fastapi import FastAPI, Request, Depends
|
from fastapi import FastAPI, Request, Depends
|
||||||
from fastapi.responses import HTMLResponse
|
from fastapi.responses import HTMLResponse
|
||||||
from sqlalchemy.ext.asyncio import async_sessionmaker, AsyncSession
|
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")
|
app = FastAPI(root_path="/api/v1")
|
||||||
|
|
||||||
|
|
|
@ -10,9 +10,9 @@ import polars as pl
|
||||||
from sqlalchemy import select
|
from sqlalchemy import select
|
||||||
from sqlalchemy.orm import Session
|
from sqlalchemy.orm import Session
|
||||||
|
|
||||||
import dengfun
|
import retailtwin
|
||||||
from dengfun.retail.utils import db_uri_from_session
|
from retailtwin.utils import db_uri_from_session
|
||||||
from dengfun.retail.models import (
|
from retailtwin.models import (
|
||||||
Discount,
|
Discount,
|
||||||
Item,
|
Item,
|
||||||
ItemBatch,
|
ItemBatch,
|
||||||
|
@ -24,7 +24,7 @@ from dengfun.retail.models import (
|
||||||
)
|
)
|
||||||
|
|
||||||
# Some configuration parameters.
|
# Some configuration parameters.
|
||||||
PACKAGE_ROOT = Path(dengfun.__file__).parent / "retail"
|
PACKAGE_ROOT = Path(retailtwin.__file__).parent / "retail"
|
||||||
PRODUCT_LIST_FILE = "data/products.csv"
|
PRODUCT_LIST_FILE = "data/products.csv"
|
||||||
DISCOUNT_LIST_FILE = "data/discounts.csv"
|
DISCOUNT_LIST_FILE = "data/discounts.csv"
|
||||||
RANDOM_PEOPLE_FILE = "data/random_people.csv"
|
RANDOM_PEOPLE_FILE = "data/random_people.csv"
|
||||||
|
|
|
@ -2,7 +2,7 @@ import typer
|
||||||
from sqlalchemy import create_engine
|
from sqlalchemy import create_engine
|
||||||
from sqlalchemy.orm import Session
|
from sqlalchemy.orm import Session
|
||||||
|
|
||||||
from dengfun.retail.bootstrap import (
|
from retailtwin.bootstrap import (
|
||||||
bootstrap_clients,
|
bootstrap_clients,
|
||||||
bootstrap_discounts,
|
bootstrap_discounts,
|
||||||
bootstrap_items,
|
bootstrap_items,
|
||||||
|
@ -11,8 +11,8 @@ from dengfun.retail.bootstrap import (
|
||||||
bootstrap_stock,
|
bootstrap_stock,
|
||||||
bootstrap_taskowners,
|
bootstrap_taskowners,
|
||||||
)
|
)
|
||||||
from dengfun.retail.models import Base
|
from retailtwin.models import Base
|
||||||
from dengfun.retail.sql.sync import funcandproc
|
from retailtwin.sql.sync import funcandproc
|
||||||
|
|
||||||
app = typer.Typer()
|
app = typer.Typer()
|
||||||
|
|
||||||
|
|
|
@ -3,9 +3,9 @@ Terminal that mimics what a Point of Sale may operate like.
|
||||||
"""
|
"""
|
||||||
import typer
|
import typer
|
||||||
import polars as pl
|
import polars as pl
|
||||||
from dengfun.retail.cli.db import query_local_batches
|
from retailtwin.cli.db import query_local_batches
|
||||||
from dengfun.retail.cli.pos.models import Base, Sync, Direction, Cart, Item
|
from retailtwin.cli.pos.models import Base, Sync, Direction, Cart, Item
|
||||||
from dengfun.retail.utils import db_uri_from_session
|
from retailtwin.utils import db_uri_from_session
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
from sqlalchemy import create_engine, select
|
from sqlalchemy import create_engine, select
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
import typer
|
import typer
|
||||||
import polars as pl
|
import polars as pl
|
||||||
from sqlalchemy import create_engine, text as query
|
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 import PromptSession
|
||||||
from prompt_toolkit.completion import WordCompleter
|
from prompt_toolkit.completion import WordCompleter
|
||||||
from prompt_toolkit.shortcuts import clear
|
from prompt_toolkit.shortcuts import clear
|
||||||
|
|
|
@ -5,7 +5,7 @@ import polars as pl
|
||||||
from scipy.stats.distributions import lognorm
|
from scipy.stats.distributions import lognorm
|
||||||
from sqlalchemy.orm import Session
|
from sqlalchemy.orm import Session
|
||||||
|
|
||||||
from dengfun.retail.models import Cart
|
from retailtwin.models import Cart
|
||||||
|
|
||||||
|
|
||||||
def cart(session: Session) -> Cart:
|
def cart(session: Session) -> Cart:
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from sqlalchemy import create_engine, text
|
from sqlalchemy import create_engine, text
|
||||||
from sqlalchemy.orm import Session
|
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):
|
def funcandproc(db_uri: str):
|
||||||
|
|
|
@ -4,7 +4,7 @@ to existing views in the database. Make sure these views have been synced after
|
||||||
table creation.
|
table creation.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from dengfun.retail.models import Base
|
from retailtwin.models import Base
|
||||||
from functools import lru_cache
|
from functools import lru_cache
|
||||||
from sqlalchemy import Table, Column, Date, Integer, String, JSON
|
from sqlalchemy import Table, Column, Date, Integer, String, JSON
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue