Skip to content

Commit

Permalink
Update python pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
Christdej committed Feb 22, 2023
1 parent 86c6516 commit a22e2af
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 27 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
python-version: ["3.8", "3.9", "3.10"]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

Expand Down
2 changes: 1 addition & 1 deletion src/isar/storage/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def construct_local_paths(
folder: Path = Path(str(metadata.mission_id))
filename: str = get_filename(
mission_id=metadata.mission_id,
inspection_type=inspection.get_metadata_type_str(),
inspection_type=type(inspection).__name__,
inspection_id=inspection.id,
)

Expand Down
24 changes: 0 additions & 24 deletions src/robot_interface/models/inspection/inspection.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,46 +49,22 @@ class Inspection:
metadata: InspectionMetadata
data: Optional[bytes] = field(default=None, init=False)

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

@staticmethod
def get_metadata_type_str() -> str:
return str(Inspection.get_metadata_type().__name__)


@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 a22e2af

Please sign in to comment.