Skip to content

Commit

Permalink
Revert change to metadata type
Browse files Browse the repository at this point in the history
  • Loading branch information
aeshub committed Mar 7, 2023
1 parent f79bf82 commit b622217
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/isar/config/settings.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import importlib.resources as pkg_resources
import os
from typing import List

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

Expand Down Expand Up @@ -101,7 +102,7 @@ class Settings(BaseSettings):
AZURE_TENANT_ID: str = Field(default="3aa4a235-b6e2-48d5-9195-7fcf05b459b0")

# Client ID for the API client
APP_CLIENT_ID: str = Field(default="68cca82d-84e7-495c-96b4-4c32509f2a46")
APP_CLIENT_ID: str = Field(default="fd384acd-5c1b-4c44-a1ac-d41d720ed0fe")

# Client ID for the OpenAPI client
OPENAPI_CLIENT_ID: str = Field(default="5f412c20-8c36-4c69-898f-d2b5051f5fb6")
Expand Down
22 changes: 21 additions & 1 deletion src/robot_interface/models/inspection/inspection.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from abc import ABC
from dataclasses import dataclass, field
from datetime import datetime
from typing import List, Optional
from typing import List, Optional, Type
from uuid import UUID, uuid4

from alitra import Pose
Expand Down Expand Up @@ -43,22 +43,42 @@ class Inspection:
metadata: InspectionMetadata
data: Optional[bytes] = field(default=None, init=False)

@staticmethod
def get_metadata_type() -> Type[InspectionMetadata]:
return InspectionMetadata


@dataclass
class Image(Inspection):
metadata: ImageMetadata

@staticmethod
def get_metadata_type() -> Type[InspectionMetadata]:
return ImageMetadata


@dataclass
class ThermalImage(Inspection):
metadata: ThermalImageMetadata

@staticmethod
def get_metadata_type() -> Type[InspectionMetadata]:
return ThermalImageMetadata


@dataclass
class Video(Inspection):
metadata: VideoMetadata

@staticmethod
def get_metadata_type() -> Type[InspectionMetadata]:
return VideoMetadata


@dataclass
class ThermalVideo(Inspection):
metadata: ThermalVideoMetadata

@staticmethod
def get_metadata_type() -> Type[InspectionMetadata]:
return ThermalVideoMetadata

0 comments on commit b622217

Please sign in to comment.