diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/README.pdf b/README.pdf new file mode 100644 index 0000000..0431664 Binary files /dev/null and b/README.pdf differ diff --git a/quantdb/__init__.py b/quantdb/__init__.py index e69de29..9d48db4 100644 --- a/quantdb/__init__.py +++ b/quantdb/__init__.py @@ -0,0 +1 @@ +from __future__ import annotations diff --git a/quantdb/ingest.py b/quantdb/ingest.py index 19abfce..85c37a1 100644 --- a/quantdb/ingest.py +++ b/quantdb/ingest.py @@ -872,7 +872,6 @@ def make_values_quant(this_dataset_updated_uuid, i, luinst): make_values_cat, make_values_quant, ) - # this is where things get annoying with needing selects on instance measured @@ -1315,7 +1314,6 @@ def ingest_demo_jp2(session, source_local=True, do_insert=True, commit=False, de def ingest_reva_ft_all(session, source_local=False, do_insert=True, batch=False, commit=False, dev=False): - dataset_uuids = ( 'aa43eda8-b29a-4c25-9840-ecbd57598afc', # f001 # the rest have uuid1 issues :/ all in the undefined folder it seems, might be able to fix with a reupload diff --git a/quantdb/postgresql_app/__init__.py b/quantdb/postgresql_app/__init__.py new file mode 100644 index 0000000..e73dd2a --- /dev/null +++ b/quantdb/postgresql_app/__init__.py @@ -0,0 +1,5 @@ +from __future__ import annotations + +from . import database + +__all__ = ['database'] diff --git a/quantdb/postgresql_app/database.py b/quantdb/postgresql_app/database.py new file mode 100644 index 0000000..411d706 --- /dev/null +++ b/quantdb/postgresql_app/database.py @@ -0,0 +1,17 @@ +from __future__ import annotations + +from typing import Any + +from sqlalchemy import create_engine +from sqlalchemy.ext.declarative import declarative_base +from sqlalchemy.orm import sessionmaker + +from quantdb.config import Settings + +# TODO: get new setting env setup first +# SQLALCHEMY_DATABASE_URL = Settings().MYSQL_URL + +# engine = create_engine(SQLALCHEMY_DATABASE_URL) +# SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine) + +# Base: Any = declarative_base() diff --git a/quantdb/router.py b/quantdb/router.py new file mode 100644 index 0000000..71b0c03 --- /dev/null +++ b/quantdb/router.py @@ -0,0 +1,21 @@ +from typing import Literal + +import uvicorn +from fastapi import FastAPI +from fastapi.middleware.wsgi import WSGIMiddleware +from fastapi.staticfiles import StaticFiles + +from quantdb.api_server import app as quantdb_flask_app + +app = FastAPI() +app.mount('/quantdb', WSGIMiddleware(quantdb_flask_app)) + + +# Root URL +@app.get('/') +def index() -> Literal['Hello']: + return 'Hello' + + +if __name__ == '__main__': + uvicorn.run('router:app', host='localhost', port=8000, reload=True)