git-afsantos / haros

H(igh) A(ssurance) ROS - Static analysis of ROS application code.
MIT License
190 stars 37 forks source link

Requirements file (missing bonsai.model)? #39

Closed gavanderhoorn closed 5 years ago

gavanderhoorn commented 5 years ago

Trying to be a stupid user I only cloned the repository and then tried to use the "no install" variant (so tried python haros-runner.py).

On a "fresh" Ubuntu Xenial system this resulted in:

Traceback (most recent call last):
  File "./haros-runner.py", line 24, in <module>
    from haros.haros import main
  File "/home/user/ros/haros/haros/haros.py", line 102, in <module>
    from .extractor import ProjectExtractor
  File "/home/user/ros/haros/haros/extractor.py", line 34, in <module>
    from bonsai.model import CodeGlobalScope, pretty_str
ImportError: No module named bonsai.model

Would it perhaps be an idea to provide a requirements.txt with the basic dependencies listed (yaml, bonsai, etc)? For the non-install option this would help avoid a nr of ImportErrors.

git-afsantos commented 5 years ago

Yes, that is a good idea :+1:

git-afsantos commented 5 years ago

https://github.com/git-afsantos/haros/pull/44 should solve this. This is an auto-generated file, using pipreqs, so it may not be 100% optimal/correct.