From dab59189cf0aad969d72c6ffcc822d73aef8800a Mon Sep 17 00:00:00 2001 From: dominik24c Date: Tue, 25 Oct 2022 20:38:47 +0200 Subject: [PATCH] update requirements.txt file and reformat code --- backend/app/project_supervisor/models.py | 6 ++--- backend/app/students/models.py | 1 - backend/app/students/routes/registrations.py | 5 ++-- backend/requirements.txt | 28 ++------------------ 4 files changed, 6 insertions(+), 34 deletions(-) diff --git a/backend/app/project_supervisor/models.py b/backend/app/project_supervisor/models.py index 5f0bd6b..d1f39bd 100644 --- a/backend/app/project_supervisor/models.py +++ b/backend/app/project_supervisor/models.py @@ -1,9 +1,7 @@ -from ..dependencies import db -from ..base.models import Person, Base from flask_sqlalchemy import BaseQuery -from sqlalchemy import or_ -from sqlalchemy.sql import text +from ..dependencies import db +from ..base.models import Person, Base from ..base.utils import order_by_column_name diff --git a/backend/app/students/models.py b/backend/app/students/models.py index 4bfeef3..4dd08f1 100644 --- a/backend/app/students/models.py +++ b/backend/app/students/models.py @@ -1,4 +1,3 @@ -from sqlalchemy.sql import text from flask_sqlalchemy import BaseQuery from ..dependencies import db diff --git a/backend/app/students/routes/registrations.py b/backend/app/students/routes/registrations.py index dea0621..f7fe5e2 100644 --- a/backend/app/students/routes/registrations.py +++ b/backend/app/students/routes/registrations.py @@ -1,16 +1,15 @@ from apiflask import APIBlueprint -from flask import abort from ...project_supervisor.models import ProjectSupervisor from ..models import Group from ...dependencies import db -from ..schemas import ProjectSupervisorPaginationSchema, ProjectSupervisorQuerySchema +from ..schemas import ProjectSupervisorQuerySchema, ProjectSupervisorPaginationSchema from ...base.utils import paginate_models bp = APIBlueprint("registrations", __name__, url_prefix="/registrations") -@bp.route('/', methods=['GET']) +@bp.get('/') @bp.input(ProjectSupervisorQuerySchema, location='query') @bp.output(ProjectSupervisorPaginationSchema) def list_available_groups(query: dict) -> dict: diff --git a/backend/requirements.txt b/backend/requirements.txt index d956d69..7d9b951 100644 --- a/backend/requirements.txt +++ b/backend/requirements.txt @@ -1,39 +1,15 @@ alembic==1.7.7 -attrs==21.4.0 click==8.1.3 Flask==2.1.2 Flask-Cors==3.0.10 flask-marshmallow==0.14.0 Flask-Migrate==3.1.0 Flask-SQLAlchemy==2.5.1 -greenlet==1.1.2 -importlib-metadata==4.11.3 -importlib-resources==5.7.1 -iniconfig==1.1.1 -itsdangerous==2.1.2 -Jinja2==3.1.2 -Mako==1.2.0 MarkupSafe==2.1.1 -marshmallow==3.15.0 marshmallow-sqlalchemy==0.28.0 -mccabe==0.6.1 -numpy==1.22.3 -packaging==21.3 pandas==1.4.2 -pluggy==1.0.0 -py==1.11.0 -pycodestyle==2.8.0 -pyflakes==2.4.0 -pyparsing==3.0.9 pytest==7.1.2 pytest-flask==1.2.0 -python-dateutil==2.8.2 -python-dotenv==0.20.0 -pytz==2022.1 -six==1.16.0 -SQLAlchemy==1.4.36 -tomli==2.0.1 -Werkzeug==2.1.2 -zipp==3.8.0 -apiflask==1.0.2 +apiflask>=1.0.2,<1.1.0 +python-dotenv==0.21.0 factory_boy==3.2.1 \ No newline at end of file