diff --git a/.github/workflows/peripheral.yml b/.github/workflows/peripheral.yml index 3de8e1c..268c3bf 100644 --- a/.github/workflows/peripheral.yml +++ b/.github/workflows/peripheral.yml @@ -17,15 +17,13 @@ jobs: - name: pip install formatters and mypy run: | pip3 install mypy flake8 isort - # Temporary commented out due to avoid testing submodule packages - # TODO (HiroIshida) fix - # - name: check by mypy - # run: | - # pip3 install -r requirements.txt - # pip3 install numpy==1.23 # to enable numpy's type checking - # mypy --version - # mypy . - + - name: check by mypy + run: | + rm node_script/detic node_script/third_party # remove symlinks. (cannot configure to exclude them by mypy somehow) + pip3 install -r requirements.txt + pip3 install numpy==1.23 # to enable numpy's type checking + mypy --version + mypy . - name: check by isort and flake8 run: | python3 -m isort example/ test/ node_script/ diff --git a/mypy.ini b/mypy.ini index 7158086..4e0ff15 100644 --- a/mypy.ini +++ b/mypy.ini @@ -4,7 +4,12 @@ exclude = Detic show_error_codes = True warn_unused_ignores = False check_untyped_defs = True +mypy_path = src +[mypy-setuptools.*] +ignore_missing_imports = True +[mypy-catkin_pkg.*] +ignore_missing_imports = True [mypy-cv_bridge] ignore_missing_imports = True [mypy-rospy] @@ -23,8 +28,6 @@ ignore_missing_imports = True ignore_missing_imports = True [mypy-centernet.config] ignore_missing_imports = True -[mypy-detic_ros.*] -ignore_missing_imports = True [mypy-sensor_msgs.*] ignore_missing_imports = True [mypy-std_msgs.*] @@ -41,3 +44,7 @@ ignore_missing_imports = True ignore_missing_imports = True [mypy-moviepy.*] ignore_missing_imports = True +[mypy-detic_ros.msg] +ignore_missing_imports = True +[mypy-detic_ros.srv] +ignore_missing_imports = True diff --git a/node_script/batch_processor.py b/node_script/batch_processor.py index e75b2d9..6763226 100644 --- a/node_script/batch_processor.py +++ b/node_script/batch_processor.py @@ -11,8 +11,8 @@ from sensor_msgs.msg import Image from moviepy.editor import ImageSequenceClip -from node_config import NodeConfig -from wrapper import DeticWrapper, InferenceRawResult +from detic_ros.node_config import NodeConfig +from detic_ros.wrapper import DeticWrapper, InferenceRawResult def bag_to_images(file_path: str, topic_name_extract: Optional[str] = None):