File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010import os
1111
1212import sqlalchemy as sa
13- from sqlalchemy .engine .reflection import Inspector
1413
1514from alembic import op
1615from app .config import QUERIES_DIR
2524
2625def upgrade ():
2726 conn = op .get_bind ()
28- inspector = Inspector . from_engine (conn )
27+ inspector = sa . inspect (conn )
2928 tables = inspector .get_table_names ()
3029
3130 # Create reach association table
Original file line number Diff line number Diff line change 1717from app .data .database import db
1818
1919
20- admin = Admin (template_mode = "bootstrap4" , index_view = AdminIndexView ())
20+ admin = Admin (index_view = AdminIndexView ())
2121
2222
2323def init_admin (app : Flask ):
Original file line number Diff line number Diff line change @@ -76,11 +76,11 @@ class are loaded into the Flask app in the `create_app` function.
7676 @property
7777 def SQLALCHEMY_DATABASE_URI (self ) -> str :
7878 if self .DATABASE_URL :
79- return self .DATABASE_URL .replace ("postgres://" , "postgresql://" )
79+ return self .DATABASE_URL .replace ("postgres://" , "postgresql+psycopg ://" )
8080 else :
8181 return str (
8282 MultiHostUrl .build (
83- scheme = "postgresql" ,
83+ scheme = "postgresql+psycopg " ,
8484 username = self .POSTGRES_USER ,
8585 password = self .POSTGRES_PASSWORD ,
8686 host = self .POSTGRES_HOST ,
Original file line number Diff line number Diff line change 99Celery
1010click
1111flasgger
12- Flask-Admin
12+ Flask-Admin==v2.0.0a4
1313Flask-BasicAuth
1414Flask-Caching
1515flask-cors
2222Jinja2
2323markdown
2424pandas
25- psycopg2- binary
25+ psycopg[ binary]
2626pyarrow
2727python-dotenv
2828PyYAML
4848pytest-celery
4949pytest-cov
5050pytest-env
51- pytest-postgresql<4.0.0
51+ pytest-postgresql
5252schemathesis
5353
5454# ==========================================================
Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ flask==3.1.1
8888 # flask-mail
8989 # flask-sqlalchemy
9090 # sentry-sdk
91- flask-admin == 1.6.1
91+ flask-admin == 2.0.0a4
9292 # via -r requirements.in
9393flask-basicauth == 0.2.0
9494 # via -r requirements.in
@@ -154,6 +154,7 @@ jinja2==3.1.6
154154 # via
155155 # -r requirements.in
156156 # flask
157+ # flask-admin
157158jsonpointer == 3.0.0
158159 # via jsonschema
159160jsonschema == 4.24.0
@@ -178,6 +179,7 @@ markdown-it-py==3.0.0
178179markupsafe == 3.0.2
179180 # via
180181 # flask
182+ # flask-admin
181183 # jinja2
182184 # mako
183185 # sentry-sdk
@@ -206,6 +208,7 @@ packaging==25.0
206208 # flasgger
207209 # gunicorn
208210 # pytest
211+ # pytest-postgresql
209212pandas == 2.2.3
210213 # via -r requirements.in
211214platformdirs == 4.3.8
@@ -226,8 +229,12 @@ psutil==7.0.0
226229 # via
227230 # mirakuru
228231 # pytest-celery
229- psycopg2-binary == 2.9.10
230- # via -r requirements.in
232+ psycopg == 3.2.9
233+ # via
234+ # -r requirements.in
235+ # pytest-postgresql
236+ psycopg-binary == 3.2.9
237+ # via psycopg
231238pyarrow == 20.0.0
232239 # via -r requirements.in
233240pydantic == 2.11.5
@@ -259,7 +266,7 @@ pytest-docker-tools==3.1.9
259266 # via pytest-celery
260267pytest-env == 1.1.5
261268 # via -r requirements.in
262- pytest-postgresql == 3.1.3
269+ pytest-postgresql == 7.0.2
263270 # via -r requirements.in
264271pytest-subtests == 0.14.1
265272 # via schemathesis
@@ -364,6 +371,7 @@ typing-extensions==4.13.2
364371 # via
365372 # alembic
366373 # anyio
374+ # psycopg
367375 # pydantic
368376 # pydantic-core
369377 # referencing
@@ -401,6 +409,7 @@ webcolors==24.11.1
401409werkzeug == 3.1.3
402410 # via
403411 # flask
412+ # flask-admin
404413 # flask-cors
405414 # schemathesis
406415wtforms == 3.1.2
You can’t perform that action at this time.
0 commit comments