Skip to content

Commit

Permalink
build: lint code
Browse files Browse the repository at this point in the history
  • Loading branch information
ACornuIGN committed Dec 22, 2023
1 parent 78ce50a commit baa9d5c
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 23 deletions.
7 changes: 2 additions & 5 deletions src/reader/manage_reader.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
"""
Photogrammetry site file reader module
"""
import os
import importlib
import numpy as np
from src.worksite import Worksite


Expand All @@ -18,8 +16,8 @@ def reader_orientation(file: str, skip: int = None) -> Worksite:
Returns:
Worksite: The worksite
"""
# Todo : Attention multiple file management orientation
# Todo : Attention management of files with the same extension but different formats
# Attention multiple file management orientation
# Attention management of files with the same extension but different formats
ext = file.split(".")[-1]
try:
my_module = importlib.import_module("src.reader.reader_" + ext.lower())
Expand All @@ -28,4 +26,3 @@ def reader_orientation(file: str, skip: int = None) -> Worksite:
raise ValueError(f"{ext} file is not taken into account !!!") from e

return work

2 changes: 1 addition & 1 deletion src/reader/reader_opk.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def read(file: str, skip: int) -> Worksite:
Returns:
Worksite: The worksite
"""
if skip == None:
if skip is None:
skip = 1

# Job name retrieval
Expand Down
30 changes: 13 additions & 17 deletions src/shot.py
Original file line number Diff line number Diff line change
@@ -1,25 +1,21 @@
"""
Acquisition data class module
"""
from dataclasses import dataclass
import numpy as np


@dataclass
class Shot:
"""
Acquisition data class
"""
def __init__(self, name_shot: str,
pos_shot: np.array, ori_shot: np.array, name_cam: str) -> None:
"""
Shot class definition
Shot class definition
Args:
name_shot (str): Name of the shot.
pos_shot (numpy.array): Array of coordinate position [X, Y, Z].
ori_shot (numpy.array): Array of orientation of the shot [Omega, Phi, Kappa].
name_cam (str): Name of the camera.
"""
self.name_shot = name_shot
self.pos_shot = pos_shot
self.ori_shot = ori_shot
self.name_cam = name_cam
Args:
name_shot (str): Name of the shot.
pos_shot (numpy.array): Array of coordinate position [X, Y, Z].
ori_shot (numpy.array): Array of orientation of the shot [Omega, Phi, Kappa].
name_cam (str): Name of the camera.
"""
name_shot : str
pos_shot : np.array
ori_shot : np.array
name_cam : str
6 changes: 6 additions & 0 deletions src/worksite.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,9 @@ def add_shot(self, name_shot: str, pos_shot: np.array,
pos_shot=pos_shot,
ori_shot=ori_shot,
name_cam=name_cam))

def add_camera(self):
"""
Add data camera in the Worksite
"""
return 0

0 comments on commit baa9d5c

Please sign in to comment.