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
4 changes: 3 additions & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ jobs:
- uses: isort/isort-action@master
with:
requirementsFiles: "requirements.txt requirements.dev.txt"
- uses: psf/black@23.11.0
- uses: psf/black@stable
with:
options: "--check --diff"
- name: Comment if linting failed
if: ${{ failure() }}
uses: thollander/actions-comment-pull-request@v2
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/review_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import requests
from mistralai.client import MistralClient


client = MistralClient(api_key=os.environ.get("MISTRAL_API_KEY"))

pr_number = os.environ.get("PR_NUMBER")
Expand Down
1 change: 0 additions & 1 deletion migrations/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from rating_api.models import BaseDbModel
from rating_api.settings import get_settings


# this is the Alembic Config object, which provides
# access to the values within the .ini file in use.
config = context.config
Expand Down
1 change: 0 additions & 1 deletion migrations/versions/0fbda260a023_add_user_id.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import sqlalchemy as sa
from alembic import op


# revision identifiers, used by Alembic.
revision = '0fbda260a023'
down_revision = '5659e13277b6'
Expand Down
1 change: 0 additions & 1 deletion migrations/versions/1c001709fc55_advanced_sort.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import sqlalchemy as sa
from alembic import op


revision = '1c001709fc55'
down_revision = 'dd44854aa12a'
branch_labels = None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

from alembic import op


# revision identifiers, used by Alembic.
revision = '20181e0d6aab'
down_revision = 'edcc1a448ffb'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import sqlalchemy as sa
from alembic import op


revision = '5659e13277b6'
down_revision = '656228b2d6e0'
branch_labels = None
Expand Down
1 change: 0 additions & 1 deletion migrations/versions/5cf69f1026d9_fixing_comments_pk.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

from alembic import op


# revision identifiers, used by Alembic.
revision = '5cf69f1026d9'
down_revision = '933db669e7ef'
Expand Down
1 change: 0 additions & 1 deletion migrations/versions/656228b2d6e0_delete_id_from_comment.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import sqlalchemy as sa
from alembic import op


revision = '656228b2d6e0'
down_revision = '7354951f8e4c'
branch_labels = None
Expand Down
1 change: 0 additions & 1 deletion migrations/versions/7354951f8e4c_add_uuid_to_comment.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import sqlalchemy as sa
from alembic import op


revision = '7354951f8e4c'
down_revision = 'dbe6ca79a40d'
branch_labels = None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import sqlalchemy as sa
from alembic import op


revision = '7388a2c219d2'
down_revision = 'fee34ac4fcab'
branch_labels = None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import sqlalchemy as sa
from alembic import op


# revision identifiers, used by Alembic.
revision = '933db669e7ef'
down_revision = '20181e0d6aab'
Expand Down
1 change: 0 additions & 1 deletion migrations/versions/beb11fd89531_lecturer_rating.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import sqlalchemy as sa
from alembic import op


# revision identifiers, used by Alembic.
revision = 'beb11fd89531'
down_revision = 'fc7cb93684e0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import sqlalchemy as sa
from alembic import op


# revision identifiers, used by Alembic.
revision = 'd322e8331f91'
down_revision = 'beb11fd89531'
Expand Down
1 change: 0 additions & 1 deletion migrations/versions/dbe6ca79a40d_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import sqlalchemy as sa
from alembic import op


revision = 'dbe6ca79a40d'
down_revision = None
branch_labels = None
Expand Down
1 change: 0 additions & 1 deletion migrations/versions/dd44854aa12a_approved_by.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import sqlalchemy as sa
from alembic import op


revision = 'dd44854aa12a'
down_revision = '5cf69f1026d9'
branch_labels = None
Expand Down
1 change: 0 additions & 1 deletion migrations/versions/edcc1a448ffb_soft_deletes.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import sqlalchemy as sa
from alembic import op


# revision identifiers, used by Alembic.
revision = 'edcc1a448ffb'
down_revision = '7388a2c219d2'
Expand Down
1 change: 0 additions & 1 deletion migrations/versions/fc7cb93684e0_likes.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import sqlalchemy as sa
from alembic import op


# revision identifiers, used by Alembic.
revision = 'fc7cb93684e0'
down_revision = '1c001709fc55'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import sqlalchemy as sa
from alembic import op


revision = 'fee34ac4fcab'
down_revision = '0fbda260a023'
branch_labels = None
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ skip-string-normalization = true
line_length = 120
multi_line_output = 3
profile = "black"
lines_after_imports = 2
include_trailing_comma = true

[tool.pytest.ini_options]
Expand Down
1 change: 0 additions & 1 deletion rating_api/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import os


__version__ = os.getenv('APP_VERSION', 'dev')
1 change: 0 additions & 1 deletion rating_api/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@

from rating_api.routes.base import app


if __name__ == '__main__':
uvicorn.run(app)
1 change: 0 additions & 1 deletion rating_api/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from .base import Base, BaseDbModel
from .db import *


__all__ = ["Base", "BaseDbModel", "Lecturer", "LecturerUserComment", "Comment"]
1 change: 0 additions & 1 deletion rating_api/models/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@

from .base import BaseDbModel


logger = logging.getLogger(__name__)


Expand Down
1 change: 0 additions & 1 deletion rating_api/routes/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from . import exc_handlers
from .base import app


__all__ = ["app", "exc_handlers"]
1 change: 0 additions & 1 deletion rating_api/routes/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from rating_api.routes.lecturer import lecturer
from rating_api.settings import Settings, get_settings


settings: Settings = get_settings()
app = FastAPI(
title='Рейтинг преподавателей',
Expand Down
1 change: 0 additions & 1 deletion rating_api/routes/comment.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
)
from rating_api.settings import Settings, get_settings


settings: Settings = get_settings()
comment = APIRouter(prefix="/comment", tags=["Comment"])

Expand Down
1 change: 0 additions & 1 deletion rating_api/routes/lecturer.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
LecturerWithRank,
)


lecturer = APIRouter(prefix="/lecturer", tags=["Lecturer"])


Expand Down
1 change: 0 additions & 1 deletion rating_api/utils/mark.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

from rating_api.settings import get_settings


settings = get_settings()


Expand Down
2 changes: 1 addition & 1 deletion requirements.dev.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
autoflake
black==23.11.0
black
httpx
isort
pytest
Expand Down
1 change: 0 additions & 1 deletion tests/test_routes/test_comment.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from rating_api.models import Comment, CommentReaction, LecturerUserComment, Reaction, ReviewStatus
from rating_api.settings import get_settings


logger = logging.getLogger(__name__)
url: str = '/comment'

Expand Down
1 change: 0 additions & 1 deletion tests/test_routes/test_lecturer.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from rating_api.models import Comment, Lecturer, ReviewStatus
from rating_api.settings import get_settings


logger = logging.getLogger(__name__)
url: str = '/lecturer'

Expand Down
Loading