profile
viewpoint

abencz/rosa 2

Helper scripts for ROS

abencz/home_config 1

bash/screen/tmux/etc configuration

abencz/OpENer 1

OpENer is an EtherNet/IP(TM) Communication Stack; a fork of http://sourceforge.net/projects/opener/

abencz/ros-mongodb_log 1

Generic MongoDB Logging for ROS

abencz/applanix_driver 0

ROS driver for Applanix hardware

delete branch locusrobotics/catkin_virtualenv

delete branch : fix-bytecode-regex

delete time in 2 months

PR merged locusrobotics/catkin_virtualenv

Make regex for Python bytecode more selective

Fix regex to match only files ending in ".py[co]" and not files ending in "py[co]".

+1 -1

1 comment

1 changed file

abencz

pr closed time in 2 months

pull request commentlocusrobotics/catkin_virtualenv

Make regex for Python bytecode more selective

This was breaking mypy in the devel folder because files like "venv/lib64/python3.7/site-packages/mypy-0.780.dist-info/top_level.txt:3220aef3144e83d3e26a__mypyc" were being deleted during relocation.

abencz

comment created time in 2 months

PR opened locusrobotics/catkin_virtualenv

Make regex for Python bytecode more selective

Fix regex to match only files ending in ".py[co]" and not files ending in "py[co]".

+1 -1

0 comment

1 changed file

pr created time in 2 months

create barnchlocusrobotics/catkin_virtualenv

branch : fix-bytecode-regex

created branch time in 2 months

pull request commentlocusrobotics/multimaster_fkie

Only update state if service calls are successful

It's really unfortunate that the original code caught everything. Makes it hard to know what exceptions were actually expected :(

MJohnson459

comment created time in 2 months

pull request commentlocusrobotics/multimaster_fkie

Only update state if service calls are successful

Feels risky because the types of exceptions that are caught has narrowed. The removed except clauses caught everything whereas checkState is called in a try...except that only handles MasterConnectionException.

MJohnson459

comment created time in 2 months

Pull request review commentlocusrobotics/multimaster_fkie

Only update state if service calls are successful

 def updateState(self, clear_cache=False):                         else:                             tmp_slist.append(service)                             param_server_multi.lookupService(self.ros_node_name, t)-                try:-                    r = param_server_multi()-                    for (code, msg, uri), service in zip(r, tmp_slist):-                        if code == 1:-                            service.uri = uri-                            if service.isLocal:-                                services[service.name] = uri-                            else:-                                self.__cached_services[service.name] = (uri, None, time.time())++                r = param_server_multi()+                for (code, msg, uri), service in zip(r, tmp_slist):+                    if code == 1:+                        service.uri = uri+                        if service.isLocal:+                            services[service.name] = uri                         else:-                            self._limited_log(service.name, "can't get contact information. ROS master responds with: %s" % msg)-                except:-                    traceback.print_exc()

Doesn't removing this except clause introduce the risk of the node crashing on an error? Or is that the intent?

MJohnson459

comment created time in 2 months

pull request commentlocusrobotics/multimaster_fkie

Only update state if service calls are successful

Ah, got it!

MJohnson459

comment created time in 2 months

Pull request review commentlocusrobotics/catkin_virtualenv

RST-3172 Check that requirements file is locked

+#!/usr/bin/env python3+# Software License Agreement (GPL)+#+# \file      venv_install+# \authors   Paul Bovbel <pbovbel@locusrobotics.com>+# \copyright Copyright (c) (2017,), Locus Robotics, All rights reserved.+#+# This program is free software: you can redistribute it and/or+# modify it under the terms of the GNU General Public License as+# published by the Free Software Foundation, either version 2 of the+# License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful, but+# WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU+# General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program. If not, see <http://www.gnu.org/licenses/>.++import argparse+import inspect+import sys++import xml.etree.ElementTree as ET++from catkin_virtualenv import configure_logging+from catkin_virtualenv.venv import Virtualenv+++if __name__ == '__main__':+    logger = configure_logging()++    parser = argparse.ArgumentParser(description=Virtualenv.install.__doc__)+    parser.add_argument(+        'venv', help="Path of virtualenv to manage")+    parser.add_argument(+        '--requirements', required=True, help="Requirements to check.")+    parser.add_argument(+        '--extra-pip-args', default="\"\"", type=str, help="Extra pip args for install.")

I think black will complain about '""' :(

paulbovbel

comment created time in 3 months

Pull request review commentlocusrobotics/catkin_virtualenv

RST-3172 Check that requirements file is locked

+#!/usr/bin/env python3+# Software License Agreement (GPL)+#+# \file      venv_install+# \authors   Paul Bovbel <pbovbel@locusrobotics.com>+# \copyright Copyright (c) (2017,), Locus Robotics, All rights reserved.+#+# This program is free software: you can redistribute it and/or+# modify it under the terms of the GNU General Public License as+# published by the Free Software Foundation, either version 2 of the+# License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful, but+# WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU+# General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program. If not, see <http://www.gnu.org/licenses/>.++import argparse+import inspect+import sys++import xml.etree.ElementTree as ET++from catkin_virtualenv import configure_logging+from catkin_virtualenv.venv import Virtualenv+++if __name__ == '__main__':+    logger = configure_logging()++    parser = argparse.ArgumentParser(description=Virtualenv.install.__doc__)+    parser.add_argument(+        'venv', help="Path of virtualenv to manage")+    parser.add_argument(+        '--requirements', required=True, help="Requirements to check.")+    parser.add_argument(+        '--extra-pip-args', default="\"\"", type=str, help="Extra pip args for install.")+    parser.add_argument(+        '--xunit-output', help="Destination where to write xunit output.")++    args = parser.parse_args()++    extra_pip_args = args.extra_pip_args[1:-1]

Maybe args.extra_pip_args(["\"", "\'"]) would be more robust if some of this pipeline changes.

paulbovbel

comment created time in 3 months

Pull request review commentlocusrobotics/catkin_virtualenv

RST-3172 Check that requirements file is locked

 # along with this program. If not, see <http://www.gnu.org/licenses/>. from __future__ import print_function +import difflib import os import logging import re import shutil import subprocess+import tempfile+import re

re already imported on line 24.

paulbovbel

comment created time in 3 months

Pull request review commentlocusrobotics/catkin_virtualenv

RST-3172 Check that requirements file is locked

+#!/usr/bin/env python3+# Software License Agreement (GPL)+#+# \file      venv_install+# \authors   Paul Bovbel <pbovbel@locusrobotics.com>+# \copyright Copyright (c) (2017,), Locus Robotics, All rights reserved.+#+# This program is free software: you can redistribute it and/or+# modify it under the terms of the GNU General Public License as+# published by the Free Software Foundation, either version 2 of the+# License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful, but+# WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU+# General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program. If not, see <http://www.gnu.org/licenses/>.++import argparse+import inspect+import sys++import xml.etree.ElementTree as ET++from catkin_virtualenv import configure_logging+from catkin_virtualenv.venv import Virtualenv+++if __name__ == '__main__':+    logger = configure_logging()++    parser = argparse.ArgumentParser(description=Virtualenv.install.__doc__)+    parser.add_argument(+        'venv', help="Path of virtualenv to manage")+    parser.add_argument(+        '--requirements', required=True, help="Requirements to check.")+    parser.add_argument(+        '--extra-pip-args', default="\"\"", type=str, help="Extra pip args for install.")+    parser.add_argument(+        '--xunit-output', help="Destination where to write xunit output.")++    args = parser.parse_args()++    extra_pip_args = args.extra_pip_args[1:-1]++    venv = Virtualenv(args.venv)+    diff = venv.check(+        requirements=args.requirements,+        extra_pip_args=extra_pip_args.split(' ') if extra_pip_args else [],
        extra_pip_args=[arg for arg in extra_pip_args.split(" ") if arg != ""],
paulbovbel

comment created time in 3 months

Pull request review commentlocusrobotics/catkin_virtualenv

RST-3172 Check that requirements file is locked

+#!/usr/bin/env python3+# Software License Agreement (GPL)+#+# \file      venv_install+# \authors   Paul Bovbel <pbovbel@locusrobotics.com>+# \copyright Copyright (c) (2017,), Locus Robotics, All rights reserved.+#+# This program is free software: you can redistribute it and/or+# modify it under the terms of the GNU General Public License as+# published by the Free Software Foundation, either version 2 of the+# License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful, but+# WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU+# General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program. If not, see <http://www.gnu.org/licenses/>.++import argparse+import inspect+import sys++import xml.etree.ElementTree as ET++from catkin_virtualenv import configure_logging+from catkin_virtualenv.venv import Virtualenv+++if __name__ == '__main__':+    logger = configure_logging()++    parser = argparse.ArgumentParser(description=Virtualenv.install.__doc__)+    parser.add_argument(+        'venv', help="Path of virtualenv to manage")+    parser.add_argument(+        '--requirements', required=True, help="Requirements to check.")+    parser.add_argument(+        '--extra-pip-args', default="\"\"", type=str, help="Extra pip args for install.")+    parser.add_argument(+        '--xunit-output', help="Destination where to write xunit output.")++    args = parser.parse_args()++    extra_pip_args = args.extra_pip_args[1:-1]++    venv = Virtualenv(args.venv)+    diff = venv.check(+        requirements=args.requirements,+        extra_pip_args=extra_pip_args.split(' ') if extra_pip_args else [],

Using if extra_pip_args ... seems risky because something like " " will evaluate to True but will result in a non-empty, invalid list.

paulbovbel

comment created time in 3 months

Pull request review commentlocusrobotics/catkin_virtualenv

RST-3172 Check that requirements file is locked

+#!/usr/bin/env python3+# Software License Agreement (GPL)+#+# \file      venv_install+# \authors   Paul Bovbel <pbovbel@locusrobotics.com>+# \copyright Copyright (c) (2017,), Locus Robotics, All rights reserved.+#+# This program is free software: you can redistribute it and/or+# modify it under the terms of the GNU General Public License as+# published by the Free Software Foundation, either version 2 of the+# License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful, but+# WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU+# General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program. If not, see <http://www.gnu.org/licenses/>.++import argparse+import inspect+import sys++import xml.etree.ElementTree as ET++from catkin_virtualenv import configure_logging+from catkin_virtualenv.venv import Virtualenv+++if __name__ == '__main__':+    logger = configure_logging()++    parser = argparse.ArgumentParser(description=Virtualenv.install.__doc__)+    parser.add_argument(+        'venv', help="Path of virtualenv to manage")+    parser.add_argument(+        '--requirements', required=True, help="Requirements to check.")+    parser.add_argument(+        '--extra-pip-args', default="\"\"", type=str, help="Extra pip args for install.")+    parser.add_argument(+        '--xunit-output', help="Destination where to write xunit output.")++    args = parser.parse_args()++    extra_pip_args = args.extra_pip_args[1:-1]

It's weird that args.extra_pip_args includes the wrapping "". Somewhere along the line extra quotes are being inserted?

paulbovbel

comment created time in 3 months

Pull request review commentlocusrobotics/catkin_virtualenv

RST-3172 Check that requirements file is locked

+#!/usr/bin/env python3+# Software License Agreement (GPL)+#+# \file      venv_install+# \authors   Paul Bovbel <pbovbel@locusrobotics.com>+# \copyright Copyright (c) (2017,), Locus Robotics, All rights reserved.+#+# This program is free software: you can redistribute it and/or+# modify it under the terms of the GNU General Public License as+# published by the Free Software Foundation, either version 2 of the+# License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful, but+# WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU+# General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program. If not, see <http://www.gnu.org/licenses/>.++import argparse+import inspect+import sys++import xml.etree.ElementTree as ET++from catkin_virtualenv import configure_logging+from catkin_virtualenv.venv import Virtualenv+++if __name__ == '__main__':+    logger = configure_logging()++    parser = argparse.ArgumentParser(description=Virtualenv.install.__doc__)+    parser.add_argument(+        'venv', help="Path of virtualenv to manage")+    parser.add_argument(+        '--requirements', required=True, help="Requirements to check.")

Since this is required, why not make it a positional arg instead of an --option?

paulbovbel

comment created time in 3 months

pull request commentlocusrobotics/aiorospy

Don't instantiate queue outside of coroutine

Pretty gross that this is required. On a completely unrelated note, why janus.Queue instead of asyncio.Queue?

Oh, asyncio.Queue is not thread safe 🤦

paulbovbel

comment created time in 3 months

pull request commentlocusrobotics/aiorospy

Passing down loop through asyncio code has been deprecated

LGTM 2: Electric Boogaloo

paulbovbel

comment created time in 3 months

startedgetsentry/responses

started time in 3 months

more