Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added README.md
Empty file.
Binary file added README.pdf
Binary file not shown.
1 change: 1 addition & 0 deletions quantdb/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from __future__ import annotations
2 changes: 0 additions & 2 deletions quantdb/ingest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions quantdb/postgresql_app/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from __future__ import annotations

from . import database

__all__ = ['database']
17 changes: 17 additions & 0 deletions quantdb/postgresql_app/database.py
Original file line number Diff line number Diff line change
@@ -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()
21 changes: 21 additions & 0 deletions quantdb/router.py
Original file line number Diff line number Diff line change
@@ -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)