Skip to content

Commit

Permalink
Update pydantic
Browse files Browse the repository at this point in the history
  • Loading branch information
Christdej committed Oct 24, 2023
1 parent 9b5c31c commit da0bd6d
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test_pythonpackage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ jobs:
python-version: ["3.9", "3.10"]

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand Down
9 changes: 8 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,14 @@
package_dir={"": "src"},
package_data={"isar_exr": []},
include_package_data=True,
install_requires=["alitra", "isar", "gql[aiohttp]", "python-dotenv", "pydantic"],
install_requires=[
"alitra",
"isar",
"gql[aiohttp]",
"python-dotenv",
"pydantic",
"pydantic_settings>=2.0.3",
],
setup_requires=[
"wheel",
],
Expand Down
7 changes: 4 additions & 3 deletions src/isar_exr/api/models/models.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
from pydantic import BaseModel, Field
from enum import Enum
from typing import Optional

from pydantic import BaseModel, Field


class Point3DInput(BaseModel):
x: float
Expand Down Expand Up @@ -51,8 +52,8 @@ class AddPointOfInterestInput(BaseModel):
frame: str
type: PointOfInterestTypeEnum = Field(default=PointOfInterestTypeEnum.GENERIC)
pose: Pose3DInput
photoAction: Optional[PointOfInterestActionPhotoInput]
videoAction: Optional[PointOfInterestActionVideoInput]
photoAction: Optional[PointOfInterestActionPhotoInput] = None
videoAction: Optional[PointOfInterestActionVideoInput] = None


class RobotTypeEnum(str, Enum):
Expand Down
3 changes: 2 additions & 1 deletion src/isar_exr/config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
from pathlib import Path

from dotenv import load_dotenv
from pydantic import BaseSettings, Field
from pydantic import Field
from pydantic_settings import BaseSettings


class Settings(BaseSettings):
Expand Down

0 comments on commit da0bd6d

Please sign in to comment.