Skip to content

Commit

Permalink
fix requirements and imports (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
JeanAEckelberg authored Sep 16, 2023
1 parent a8fe6ee commit 01bd879
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 11 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ Myst-Parser~=2.0.0
furo~=2023.7.26
SQLAlchemy~=2.0.2
pydantic~=2.3.0
fastapi~=0.103.1
fastapi[all]~=0.103.1
8 changes: 8 additions & 0 deletions server/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
from sqlalchemy.orm import Session
from models.base import Base
from database import SessionLocal, engine
from models.run import Run
from models.errors import Errors
from models.group_run import GroupRun
from models.team import Team
from models.team_type import TeamType
from models.submission import Submission
from models.turn_table import TurnTable
from models.university import University

Base.metadata.create_all(bind=engine)

Expand Down
2 changes: 1 addition & 1 deletion server/models/errors.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from sqlalchemy import ForeignKey, Integer, String
from sqlalchemy.orm import Mapped, mapped_column

from server.models.base import Base
from .base import Base


class Errors(Base):
Expand Down
4 changes: 2 additions & 2 deletions server/models/group_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
from sqlalchemy import Boolean, Integer, String, DateTime
from sqlalchemy.orm import relationship, Mapped, mapped_column

from server.models.base import Base
from server.models.run import Run
from .base import Base
from .run import Run


class GroupRun(Base):
Expand Down
2 changes: 1 addition & 1 deletion server/models/run.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from sqlalchemy import LargeBinary, Boolean, ForeignKey, Integer, DateTime
from sqlalchemy.orm import Mapped, mapped_column

from server.models.base import Base
from .base import Base


class Run(Base):
Expand Down
2 changes: 1 addition & 1 deletion server/models/submission.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from sqlalchemy import LargeBinary, ForeignKey, Integer, DateTime
from sqlalchemy.orm import Mapped, mapped_column

from server.models.base import Base
from .base import Base


class Submission(Base):
Expand Down
2 changes: 1 addition & 1 deletion server/models/team.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from sqlalchemy import CheckConstraint, ForeignKey, Integer, String
from sqlalchemy.orm import Mapped, mapped_column

from server.models.base import Base
from .base import Base
from uuid import uuid4


Expand Down
4 changes: 2 additions & 2 deletions server/models/team_type.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
from sqlalchemy import Integer, Boolean, CheckConstraint, String
from sqlalchemy.orm import Mapped, mapped_column

from server.models.base import Base
from .base import Base


class TeamType(Base):
__tablename__: str = 'team_type'
team_type_id: Mapped[int] = mapped_column(Integer(), primary_key=True, autoincrement=True)
team_type_name: Mapped[str] = mapped_column(String(15), CheckConstraint("team_type_name != ''"), nullable=False,
unique=True)
eligible: bool = mapped_column(Boolean(), nullable=False)
eligible: Mapped[bool] = mapped_column(Boolean(), nullable=False)
2 changes: 1 addition & 1 deletion server/models/turn_table.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from sqlalchemy import LargeBinary, ForeignKey, Integer
from sqlalchemy.orm import Mapped, mapped_column

from server.models.base import Base
from .base import Base


class TurnTable(Base):
Expand Down
2 changes: 1 addition & 1 deletion server/models/university.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from sqlalchemy import Integer, CheckConstraint, String
from sqlalchemy.orm import Mapped, mapped_column

from server.models.base import Base
from .base import Base


class University(Base):
Expand Down

0 comments on commit 01bd879

Please sign in to comment.