Skip to content

Commit 5a35d2c

Browse files
authored
Merge branch 'melodic-devel' into noetic-devel
2 parents b2f6a43 + 56105ad commit 5a35d2c

File tree

6 files changed

+38
-24
lines changed

6 files changed

+38
-24
lines changed

.travis.yml

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
# this is .traivs.yml written by ./create_travis_settings.py
2+
# this is .traivs.yml written by -
33

44
# https://github.com/ros-infrastructure/ros_buildfarm/blob/master/doc/jobs/devel_jobs.rst
55
# https://github.com/ros-infrastructure/ros_buildfarm/blob/master/doc/jobs/prerelease_jobs.rst
@@ -8,22 +8,34 @@ sudo: true
88
dist: bionic
99
language: python
1010
python:
11-
- "3.7"
11+
- "3.6"
12+
addons:
13+
apt:
14+
packages:
15+
- python2.7
16+
- 2to3
1217
env:
1318
global:
1419
- JOB_PATH=/tmp/devel_job
1520
- ABORT_ON_TEST_FAILURE=1
21+
- INDEX_URL=https://raw.githubusercontent.com/ros-infrastructure/ros_buildfarm_config/production/index.yaml
1622
matrix:
17-
- ROS_DISTRO_NAME=kinetic OS_NAME=ubuntu OS_CODE_NAME=xenial ARCH=amd64
23+
- CHECK_PYTHON2_COMPILE=true
24+
- CHECK_PYTHON3_COMPILE=true
25+
- ROS_DISTRO_NAME=indigo OS_NAME=ubuntu OS_CODE_NAME=trusty ARCH=amd64 INDEX_URL=https://raw.githubusercontent.com/ros-infrastructure/ros_buildfarm_config/6a93d17/index.yaml
26+
- ROS_DISTRO_NAME=kinetic OS_NAME=ubuntu OS_CODE_NAME=xenial ARCH=amd64 INDEX_URL=https://raw.githubusercontent.com/ros-infrastructure/ros_buildfarm_config/6a93d17/index.yaml
1827
- ROS_DISTRO_NAME=melodic OS_NAME=ubuntu OS_CODE_NAME=bionic ARCH=amd64
1928
- ROS_DISTRO_NAME=noetic OS_NAME=ubuntu OS_CODE_NAME=focal ARCH=amd64
20-
# matrix:
21-
# allow_failures:
22-
# - env: ROS_DISTRO_NAME=kinetic OS_NAME=ubuntu OS_CODE_NAME=xenial ARCH=amd64
29+
# matrix:
30+
# allow_failures:
31+
# - env: ROS_DISTRO_NAME=melodic OS_NAME=ubuntu OS_CODE_NAME=bionic ARCH=amd64
2332
install:
24-
# check python code code compatibility
25-
- docker run --rm -v$(pwd):/opt/code -ti ${OS_NAME}:${OS_CODE_NAME} bash -c 'set -x; set -e; apt update -qq; apt install -y -qq lsb-release libroslib-dev python 2>&1 >/dev/null; set +x; for file in /etc/catkin/profile.d/*.sh; do echo $file; source $file; done; set -x; apt install -y -qq python${ROS_PYTHON_VERSION} 2>&1 >/dev/null; lsb_release -a; python${ROS_PYTHON_VERSION} --version; set +x; cd /opt/code; EXIT_STATUS=0; for file in $(find -type f); do if [[ $file == *.py || \"$(head -1 $file)\" =~ \"python\" ]]; then echo \"Check if $file is compatible with python${ROS_PYTHON_VERSION}\"; set -x; python${ROS_PYTHON_VERSION} -m py_compile $file || EXIT_STATUS=1; set +x; fi; done; exit $EXIT_STATUS';
33+
# check python2 compatibility
34+
- if [ "${CHECK_PYTHON2_COMPILE}" == "true" ]; then python2 -m compileall .; exit $?; fi
35+
# check python3 compatibility
36+
- if [ "${CHECK_PYTHON3_COMPILE}" == "true" ]; then bash -c "ret=0; trap 'ret=1' ERR; python3 -m compileall .; 2to3 -w -f except -f execfile -f has_key -f import -f raw_input -f zip .; git diff --exit-code . > /dev/null; echo Exitting with \$ret; exit \$ret"; exit $?; fi
2637
# either install the latest released version of ros_buildfarm
38+
- pip install pyyaml==5.4.1 ## latest pyyaml raises TypeError: load() missing 1 required positional argument: 'Loader'
2739
- pip install ros_buildfarm
2840
# or checkout a specific branch
2941
#- git clone -b master https://github.com/ros-infrastructure/ros_buildfarm /tmp/ros_buildfarm
@@ -36,7 +48,9 @@ install:
3648
- mkdir -p $JOB_PATH/ws/src
3749
- cp -R $TRAVIS_BUILD_DIR $JOB_PATH/ws/src/
3850
# generate the script to run a pre-release job for that target and repo
39-
- generate_prerelease_script.py https://raw.githubusercontent.com/ros-infrastructure/ros_buildfarm_config/production/index.yaml $ROS_DISTRO_NAME default $OS_NAME $OS_CODE_NAME $ARCH --output-dir $JOB_PATH
51+
- generate_prerelease_script.py $INDEX_URL $ROS_DISTRO_NAME default $OS_NAME $OS_CODE_NAME $ARCH --output-dir $JOB_PATH
52+
# update keys for trusty/xenial
53+
- set -x; if [ "${OS_CODE_NAME}" = "trusty" ] || [ "${OS_CODE_NAME}" = "xenial" ]; then sed -i /0.key$/a'curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | tee $WORKSPACE/keys/0.key' $JOB_PATH/prerelease_build_*.sh; fi
4054
# run the actual job which involves Docker
4155
- cd $JOB_PATH; sh ./prerelease.sh -y
4256
script:

smach_viewer/scripts/smach_viewer.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,12 @@ def import_non_local(name, custom_name=None):
8484
### Helper Functions
8585
def graph_attr_string(attrs):
8686
"""Generate an xdot graph attribute string."""
87-
attrs_strs = ['"'+str(k)+'"="'+str(v)+'"' for k,v in attrs.iteritems()]
87+
attrs_strs = ['"'+str(k)+'"="'+str(v)+'"' for k,v in attrs.items()]
8888
return ';\n'.join(attrs_strs)+';\n'
8989

9090
def attr_string(attrs):
9191
"""Generate an xdot node attribute string."""
92-
attrs_strs = ['"'+str(k)+'"="'+str(v)+'"' for k,v in attrs.iteritems()]
92+
attrs_strs = ['"'+str(k)+'"="'+str(v)+'"' for k,v in attrs.items()]
9393
return ' ['+(', '.join(attrs_strs))+']'
9494

9595
def get_parent_path(path):
@@ -299,10 +299,10 @@ def get_dotcode(self, selected_paths, closed_paths, depth, max_depth, containers
299299
dotstr += '"%s" %s;\n' % (child_path, attr_string(child_attrs))
300300

301301
# Iterate over edges
302-
internal_edges = zip(
302+
internal_edges = list(zip(
303303
self._internal_outcomes,
304304
self._outcomes_from,
305-
self._outcomes_to)
305+
self._outcomes_to))
306306

307307
# Add edge from container label to initial state
308308
internal_edges += [('','__proxy__',initial_child) for initial_child in self._initial_states]
@@ -767,7 +767,7 @@ def selection_changed(self, event):
767767

768768
# Generate the userdata string
769769
ud_str = ''
770-
for (k,v) in container._local_data._data.iteritems():
770+
for (k,v) in container._local_data._data.items():
771771
ud_str += str(k)+": "
772772
vstr = str(v)
773773
# Add a line break if this is a multiline value
@@ -799,7 +799,7 @@ def _structure_msg_update(self, msg, server_name):
799799
parent_path = '/'.join(pathsplit[0:-1])
800800

801801
rospy.logdebug("RECEIVED: "+path)
802-
rospy.logdebug("CONTAINERS: "+str(self._containers.keys()))
802+
rospy.logdebug("CONTAINERS: "+str(list(self._containers.keys())))
803803

804804
# Initialize redraw flag
805805
needs_redraw = False
@@ -912,7 +912,7 @@ def _update_graph(self):
912912

913913
# Generate the rest of the graph
914914
# TODO: Only re-generate dotcode for containers that have changed
915-
for path,tc in containers_to_update.iteritems():
915+
for path,tc in containers_to_update.items():
916916
dotstr += tc.get_dotcode(
917917
self._selected_paths,[],
918918
0,self._max_depth,
@@ -929,7 +929,7 @@ def _update_graph(self):
929929
self._structure_changed = False
930930

931931
# Update the styles for the graph if there are any updates
932-
for path,tc in containers_to_update.iteritems():
932+
for path,tc in containers_to_update.items():
933933
tc.set_styles(
934934
self._selected_paths,
935935
0,self._max_depth,
@@ -960,7 +960,7 @@ def _update_tree(self):
960960
self._update_cond.wait()
961961
self.tree.DeleteAllItems()
962962
self._tree_nodes = {}
963-
for path,tc in self._top_containers.iteritems():
963+
for path,tc in self._top_containers.items():
964964
self.add_to_tree(path, None)
965965

966966
def add_to_tree(self, path, parent):
@@ -973,7 +973,7 @@ def add_to_tree(self, path, parent):
973973
# Add children to tree
974974
for label in self._containers[path]._children:
975975
child_path = '/'.join([path,label])
976-
if child_path in self._containers.keys():
976+
if child_path in list(self._containers.keys()):
977977
self.add_to_tree(child_path, container)
978978
else:
979979
self.tree.AppendItem(container,label)
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
import wxxdot
2-
import xdot_qt
1+
from . import wxxdot
2+
from . import xdot_qt
33

smach_viewer/src/smach_viewer/xdot/wxxdot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# You should have received a copy of the GNU Lesser General Public License
2020
# along with this program. If not, see <http://www.gnu.org/licenses/>.
2121

22-
from xdot import *
22+
from .xdot import *
2323

2424

2525
__all__ = ['WxDotWindow', 'WxDotFrame']

smach_viewer/src/smach_viewer/xdot/xdot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1119,7 +1119,7 @@ def parse_subgraph(self):
11191119
self.parse_stmt()
11201120
self.consume()
11211121
new_shapes = set(self.shapes) - shapes_before
1122-
self.subgraph_shapes[id] = [s for s in new_shapes if not any([s in ss for ss in self.subgraph_shapes.values()])]
1122+
self.subgraph_shapes[id] = [s for s in new_shapes if not any([s in ss for ss in list(self.subgraph_shapes.values())])]
11231123
return id
11241124

11251125
def parse_stmt(self):

smach_viewer/src/smach_viewer/xdot/xdot_qt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,7 @@ def parse_subgraph(self):
924924
self.parse_stmt()
925925
self.consume()
926926
new_shapes = set(self.shapes) - shapes_before
927-
self.subgraph_shapes[id] = [s for s in new_shapes if not any([s in ss for ss in self.subgraph_shapes.values()])]
927+
self.subgraph_shapes[id] = [s for s in new_shapes if not any([s in ss for ss in list(self.subgraph_shapes.values())])]
928928
return id
929929

930930
def parse_stmt(self):

0 commit comments

Comments
 (0)