• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

lunarlab-gatech / robotdataprocess / 21483849472

29 Jan 2026 03:20PM UTC coverage: 74.142% (-0.5%) from 74.672%
21483849472

Pull #10

github

DanielChaseButterfield
Fix with dependency mismatch with typeguard in conversion_utils, ImageDataOnDisk for .npy files, linear interpolation for odometry data
Pull Request #10: (v0.2) Prototype code for ROS2 Publishing, and new ImageDataOnDisk class

881 of 1305 new or added lines in 14 files covered. (67.51%)

2 existing lines in 1 file now uncovered.

1749 of 2359 relevant lines covered (74.14%)

1.48 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

81.82
/src/robotdataprocess/ModuleImporter.py
1
import importlib
2✔
2

3
class ModuleImporter:
2✔
4
    """ This class allows us to Lazily import ROS modules to make execution in non-ROS workspaces possible.
5
        Additionally caches the imports to support real-time publishing when using RosPublisher.py """
6
    
7
    _module_cache: dict = {}
2✔
8
    _attr_cache: dict = {}
2✔
9

10
    @classmethod
2✔
11
    def get_module_attribute(cls, module_path: str, attr_name: str):
2✔
12
        """ Dynamically loads and caches a ROS attribute (like a Class). """
13

14
        key = f"{module_path}.{attr_name}"
2✔
15
        if key not in cls._attr_cache:
2✔
16
            module = cls.get_module(module_path)
2✔
17
            try:
2✔
18
                cls._attr_cache[key] = getattr(module, attr_name)
2✔
NEW
19
            except (ImportError, AttributeError) as e:
×
NEW
20
                raise ImportError(f"Module '{module_path}' was found, but attribute '{attr_name}' does not exist. Ensure you have the correct ROS message packages installed.") from e
×
21
        return cls._attr_cache[key]
2✔
22

23
    @classmethod
2✔
24
    def get_module(cls, name: str):
2✔
25
        """ Returns a cached reference to a top-level module or sub-module (e.g., 'rospy' or 'sensor_msgs.msg'). """
26

27
        if name not in cls._module_cache:
2✔
28
            try:
2✔
29
                cls._module_cache[name] = importlib.import_module(name)
2✔
NEW
30
            except ImportError as e:
×
NEW
31
                raise ImportError(f"Module {name} is required but not installed.") from e
×
32
        return cls._module_cache[name]
2✔
33

34
    
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc