Skip to content

Commit

Permalink
Merge pull request #26 from CentraleNantesRobotics/develop
Browse files Browse the repository at this point in the history
Added roslint, pre-commit formatting and CI
  • Loading branch information
Stormix authored Jan 13, 2020
2 parents fd688d2 + 8cb0e71 commit 76d8fc2
Show file tree
Hide file tree
Showing 14 changed files with 438 additions and 285 deletions.
5 changes: 5 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[flake8]
ignore = F841
max-line-length = 120
max-complexity = 18
select = B,C,E,F,W,T4,B9
32 changes: 32 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: ROS CI
on: [push]
jobs:
build:
runs-on: ubuntu-18.04
container: ros:melodic-ros-base
steps:
- uses: actions/checkout@v1
- name: Install catkin & package dependencies
run: |
cd / && ./ros_entrypoint.sh
apt-get update
apt-get install -y python-pip
apt-get install -y ros-melodic-catkin python-catkin-tools
apt-get install -y ros-melodic-cv-bridge
apt-get install -y ros-melodic-roslint
pip install bluerobotics-ping
- name: Setup catkin workspace
run: |
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws
/bin/bash -c "source /opt/ros/melodic/setup.bash && catkin build"
- name: Build package
run: |
cd ~/catkin_ws/src
cp -r $GITHUB_WORKSPACE .
/bin/bash -c "source ../devel/setup.bash && catkin build"
- name: Lint
run: |
cd ~/catkin_ws/src
catkin build ping360_sonar --catkin-make-args roslint
19 changes: 19 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Mark stale issues and pull requests

on:
schedule:
- cron: "0 0 * * *"

jobs:
stale:

runs-on: ubuntu-latest

steps:
- uses: actions/stale@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'Stale issue message'
stale-pr-message: 'Stale pull request message'
stale-issue-label: 'no-issue-activity'
stale-pr-label: 'no-pr-activity'
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.vscode
launch/test.launch
**/*.pyc
9 changes: 9 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
repos:
- repo: https://github.com/pre-commit/mirrors-autopep8
rev: v1.4.4
hooks:
- id: autopep8
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v1.2.3
hooks:
- id: flake8
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ find_package(catkin REQUIRED COMPONENTS
std_msgs
dynamic_reconfigure
message_generation
roslint
)
find_package(OpenCV REQUIRED)

Expand All @@ -25,6 +26,7 @@ find_package(OpenCV REQUIRED)
## modules and global scripts declared therein get installed
## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html
catkin_python_setup()
roslint_python()

################################################
## Declare ROS messages, services and actions ##
Expand Down
23 changes: 12 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# ping360_sonar
[![GitHub stars](https://img.shields.io/github/stars/CentraleNantesRobotics/ping360_sonar_python.svg?style=social&label=Star&maxAge=2592000)](https://GitHub.com/CentraleNantesRobotics/ping360_sonar_python/stargazers/)
[![GitHub forks](https://img.shields.io/github/forks/CentraleNantesRobotics/ping360_sonar_python.svg?style=social&label=Fork&maxAge=2592000)](https://GitHub.com/CentraleNantesRobotics/ping360_sonar_python/network/)
[![GitHub issues](https://img.shields.io/github/issues/CentraleNantesRobotics/ping360_sonar_python.svg)](https://GitHub.com/CentraleNantesRobotics/ping360_sonar_python/issues/)
[![GitHub license](https://img.shields.io/github/license/CentraleNantesRobotics/ping360_sonar_python.svg)](https://github.com/CentraleNantesRobotics/ping360_sonar_python/blob/master/LICENSE)
[![Github all releases](https://img.shields.io/github/downloads/CentraleNantesRobotics/ping360_sonar_python/total.svg)](https://GitHub.com/CentraleNantesRobotics/ping360_sonar_python/releases/)
[![GitHub release](https://img.shields.io/github/release/CentraleNantesRobotics/ping360_sonar_python.svg)](https://GitHub.com/CentraleNantesRobotics/ping360_sonar_python/releases/)
[![GitHub stars](https://img.shields.io/github/stars/CentraleNantesRobotics/ping360_sonar.svg?style=social&label=Star&maxAge=2592000)](https://GitHub.com/CentraleNantesRobotics/ping360_sonar/stargazers/)
[![GitHub forks](https://img.shields.io/github/forks/CentraleNantesRobotics/ping360_sonar.svg?style=social&label=Fork&maxAge=2592000)](https://GitHub.com/CentraleNantesRobotics/ping360_sonar/network/)
[![Build Status](https://github.com/CentraleNantesRobotics/ping360_sonar/workflows/ROS%20CI/badge.svg)](https://GitHub.com/CentraleNantesRobotics/ping360_sonar/)
[![GitHub issues](https://img.shields.io/github/issues/CentraleNantesRobotics/ping360_sonar.svg)](https://GitHub.com/CentraleNantesRobotics/ping360_sonar/issues/)
[![GitHub license](https://img.shields.io/github/license/CentraleNantesRobotics/ping360_sonar.svg)](https://github.com/CentraleNantesRobotics/ping360_sonar/blob/master/LICENSE)
[![Github all releases](https://img.shields.io/github/downloads/CentraleNantesRobotics/ping360_sonar/total.svg)](https://GitHub.com/CentraleNantesRobotics/ping360_sonar/releases/)
[![GitHub release](https://img.shields.io/github/release/CentraleNantesRobotics/ping360_sonar.svg)](https://GitHub.com/CentraleNantesRobotics/ping360_sonar/releases/)
[![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors-)
## Overview

Expand All @@ -20,7 +21,7 @@ The source code is released under a [MIT license](LICENSE).

### Download the latest release

Get the latest stable release [here](https://github.com/CentraleNantesRobotics/ping360_sonar_python/releases/latest).
Get the latest stable release [here](https://github.com/CentraleNantesRobotics/ping360_sonar/releases/latest).

### Building from Source

Expand All @@ -39,7 +40,7 @@ Before building from source, install [ping-protocol python lib](https://pypi.org
To build from source, clone the latest version from this repository into your catkin workspace and compile the package using

cd catkin_workspace/src
git clone https://github.com/CentraleNantesRobotics/ping360_sonar_python.git
git clone https://github.com/CentraleNantesRobotics/ping360_sonar.git
cd ../
catkin build

Expand Down Expand Up @@ -111,7 +112,7 @@ While continuously rotating the sonar, it publishes two types of messages:

## Bugs & Feature Requests

Please report bugs and request features using the [Issue Tracker](https://github.com/CentraleNantesRobotics/ping360_sonar_python/issues).
Please report bugs and request features using the [Issue Tracker](https://github.com/CentraleNantesRobotics/ping360_sonar/issues).


[ROS]: http://www.ros.org
Expand All @@ -129,8 +130,8 @@ Please report bugs and request features using the [Issue Tracker](https://github
<!-- markdownlint-disable -->
<table>
<tr>
<td align="center"><a href="https://github.com/Hameck"><img src="https://avatars2.githubusercontent.com/u/14954732?v=4" width="100px;" alt=""/><br /><sub><b>Henrique Martinez Rocamora</b></sub></a><br /><a href="https://github.com/CentraleNantesRobotics/ping360_sonar_python/commits?author=Hameck" title="Code">💻</a> <a href="https://github.com/CentraleNantesRobotics/ping360_sonar_python/commits?author=Hameck" title="Tests">⚠️</a></td>
<td align="center"><a href="https://stormix.co"><img src="https://avatars2.githubusercontent.com/u/18377687?v=4" width="100px;" alt=""/><br /><sub><b>Anas Mazouni</b></sub></a><br /><a href="https://github.com/CentraleNantesRobotics/ping360_sonar_python/commits?author=Stormiix" title="Code">💻</a> <a href="https://github.com/CentraleNantesRobotics/ping360_sonar_python/commits?author=Stormiix" title="Tests">⚠️</a></td>
<td align="center"><a href="https://github.com/Hameck"><img src="https://avatars2.githubusercontent.com/u/14954732?v=4" width="100px;" alt=""/><br /><sub><b>Henrique Martinez Rocamora</b></sub></a><br /><a href="https://github.com/CentraleNantesRobotics/ping360_sonar/commits?author=Hameck" title="Code">💻</a> <a href="https://github.com/CentraleNantesRobotics/ping360_sonar/commits?author=Hameck" title="Tests">⚠️</a></td>
<td align="center"><a href="https://stormix.co"><img src="https://avatars2.githubusercontent.com/u/18377687?v=4" width="100px;" alt=""/><br /><sub><b>Anas Mazouni</b></sub></a><br /><a href="https://github.com/CentraleNantesRobotics/ping360_sonar/commits?author=Stormiix" title="Code">💻</a> <a href="https://github.com/CentraleNantesRobotics/ping360_sonar/commits?author=Stormiix" title="Tests">⚠️</a></td>
<td align="center"><a href="https://github.com/tomlogan501"><img src="https://avatars3.githubusercontent.com/u/56969577?v=4" width="100px;" alt=""/><br /><sub><b>tomlogan501</b></sub></a><br /><a href="#ideas-tomlogan501" title="Ideas, Planning, & Feedback">🤔</a></td>
</tr>
</table>
Expand Down
20 changes: 15 additions & 5 deletions package.xml
Original file line number Diff line number Diff line change
@@ -1,30 +1,40 @@
<?xml version="1.0"?>
<?xml version="1.0" ?>
<package format="2">
<name>ping360_sonar</name>
<version>0.1.0</version>
<description>The sonar-ping360 package</description>
<version>1.2.2</version>
<description>A ROS package for Blue Robotics Ping360 Sonar</description>

<url type="website">http://wiki.ros.org/ping360_sonar</url>
<url type="repository">https://github.com/CentraleNantesRobotics/ping360_sonar.git</url>
<url type="bugtracker">https://github.com/CentraleNantesRobotics/ping360_sonar/issues</url>

<author>Anas Mazouni</author>
<author>Henrique Martinez de Azevedo</author>

<maintainer email="[email protected]">Anas Mazouni</maintainer>
<maintainer email="[email protected]">Henrique Martinez de Azevedo</maintainer>


<license>MIT</license>

<buildtool_depend>catkin</buildtool_depend>

<build_depend>cv_bridge</build_depend>
<build_depend>rospy</build_depend>
<build_depend>dynamic_reconfigure</build_depend>
<build_depend>sensor_msgs</build_depend>
<build_depend>std_msgs</build_depend>
<build_depend>message_generation</build_depend>
<build_depend>roslint</build_depend>

<build_export_depend>cv_bridge</build_export_depend>
<build_export_depend>rospy</build_export_depend>
<build_export_depend>sensor_msgs</build_export_depend>
<build_export_depend>std_msgs</build_export_depend>

<exec_depend>cv_bridge</exec_depend>
<exec_depend>rospy</exec_depend>
<exec_depend>sensor_msgs</exec_depend>
<exec_depend>std_msgs</exec_depend>
<exec_depend>dynamic_reconfigure</exec_depend>
<exec_depend>message_runtime</exec_depend>
</package>
</package>
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
install_requires=['bluerobotics-ping']
)

setup(**setup_args)
setup(**setup_args)
Loading

0 comments on commit 76d8fc2

Please sign in to comment.