36 from __future__
import print_function
41 from catkin_pkg.packages
import find_packages
46 ros_distros = sorted(ros_ubuntu_dict.keys())
47 section_header =
"### ROS Buildfarm\n"
48 header =
"MoveIt Package"
49 header_lines =
"-" * len(header)
50 for ros
in ros_distros:
51 source =
" ".join([ros.capitalize(),
"Source"])
52 debian =
" ".join([ros.capitalize(),
"Debian"])
53 header =
" | ".join([header, source, debian])
54 header_lines =
" | ".join([header_lines,
"-" * len(source),
"-" * len(debian)])
55 return "\n".join([section_header, header, header_lines])
60 params[
"job"] =
"{R}src_u{U}__{package}__ubuntu_{ubuntu}__source".format(
63 params[
"url"] =
"{base_url}/view/{R}src_u{U}/job/{job}".format(**params)
67 ] =
"{R}bin_u{U}64__{package}__ubuntu_{ubuntu}_amd64__binary".format(**params)
68 params[
"url"] =
"{base_url}/view/{R}bin_u{U}64/job/{job}".format(**params)
72 ros_distros = sorted(ros_ubuntu_dict.keys())
73 line_format =
" | [![Build Status]({base_url}/buildStatus/icon?job={job})]({url})"
75 print(package, file=sys.stderr)
76 for ros
in ros_distros:
77 ubuntu = ros_ubuntu_dict[ros]
80 "U": ubuntu[0].upper(),
81 "ubuntu": ubuntu.lower(),
83 "base_url":
"https://build.ros.org",
85 for target
in [
"src",
"bin"]:
87 response = requests.get(params[
"url"]).status_code
90 if response < 400
or ubuntu ==
"focal":
91 line += line_format.format(**params)
95 " {}: {} {}".format(ros, response, params[
"url"]), file=sys.stderr
102 """Create MoveIt buildfarm badge table."""
107 supported_distro_ubuntu_dict = {
112 all_packages = sorted(
113 package.name
for _, package
in find_packages(os.getcwd()).items()
117 for package
in all_packages:
118 if package.startswith(
"moveit"):
119 moveit_packages.append(package)
121 other_packages.append(package)
122 moveit_packages.extend(other_packages)
124 buildfarm_table =
create_header(supported_distro_ubuntu_dict)
125 for package
in moveit_packages:
126 buildfarm_table +=
create_line(package, supported_distro_ubuntu_dict)
127 print(buildfarm_table)
130 if __name__ ==
"__main__":
def create_line(package, ros_ubuntu_dict)
def create_header(ros_ubuntu_dict)
def define_urls(target, params)
def create_moveit_buildfarm_table()
void print(PropagationDistanceField &pdf, int numX, int numY, int numZ)