Skip to content

Commit

Permalink
Add pre-commit, format with black and isort (RobotWebTools#648)
Browse files Browse the repository at this point in the history
  • Loading branch information
kenji-miyake authored Sep 28, 2021
1 parent 0ec6845 commit ef0e417
Show file tree
Hide file tree
Showing 108 changed files with 2,648 additions and 1,688 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: pre-commit

on:
pull_request:
workflow_dispatch:

jobs:
pre-commit:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Setup Python
uses: actions/setup-python@v2

- name: Run pre-commit
uses: pre-commit/[email protected]
47 changes: 47 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Modified from https://github.com/ros-planning/moveit2/blob/d184714751b347a2389cf1e8742b1be94eed63b8/.pre-commit-config.yaml
#
# To use:
#
# pre-commit run -a
#
# Or:
#
# pre-commit install # (runs every time you commit in git)
#
# To update this file:
#
# pre-commit autoupdate
#
# See https://github.com/pre-commit/pre-commit

repos:
# Standard hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-json
- id: check-merge-conflict
- id: check-symlinks
- id: check-toml
- id: check-yaml
- id: debug-statements
- id: destroyed-symlinks
- id: detect-private-key
- id: end-of-file-fixer
- id: mixed-line-ending
- id: pretty-format-json
- id: trailing-whitespace

- repo: https://github.com/psf/black
rev: 21.9b0
hooks:
- id: black
args: ["--line-length=100"]

- repo: https://github.com/pycqa/isort
rev: 5.8.0
hooks:
- id: isort
name: isort (python)
2 changes: 1 addition & 1 deletion AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ Contributors
* Brandon Alexander ([email protected])
* David Bertram ([email protected])
* Matthias Gruhler ([email protected])
* Travis Prosser ([email protected])
* Travis Prosser ([email protected])
3 changes: 1 addition & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ DEVEL
* more natural json for call service result (OTL)
* Add service call fail handling (OTL)

2013-07-16 - **0.5.0**
2013-07-16 - **0.5.0**
* Adds travis CI script (rctoris)
* current authentication op code added (rctoris)
* Removes global bin installation (jihoonl)
Expand Down Expand Up @@ -45,4 +45,3 @@ DEVEL
* Fixes "int is not iterable" bug (baalexander)
* Catkinizes tests (baalexander)
* Catkinizes packages (baalexander)

6 changes: 3 additions & 3 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ are met:
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of Robert Bosch LLC, Willow Garage Inc.,
Worcester Polytechnic Institute, Yujin Robot nor the names of its
contributors may be used to endorse or promote products derived
* Neither the name of Robert Bosch LLC, Willow Garage Inc.,
Worcester Polytechnic Institute, Yujin Robot nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
Expand Down
26 changes: 13 additions & 13 deletions ROSBRIDGE_PROTOCOL.md
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ message is dropped.

Optional authentication information can be passed via the rosbridge protocol
to authenticate a client connection. This information should come from some
trusted third-party authenticator.
trusted third-party authenticator.

Authentication is based on the MAC (message authentication code) scheme. The
key to using MAC is that it does not tie users to a single "user database."
Expand All @@ -272,13 +272,13 @@ It simply requires some trusted third-party to provide the hash-keys.
To send authentication credentials, use the auth command.

```json
{ "op": "auth",
"mac": <string>,
"client": <string>,
"dest": <string>,
"rand": <string>,
"t": <int>,
"level": <string>,
{ "op": "auth",
"mac": <string>,
"client": <string>,
"dest": <string>,
"rand": <string>,
"t": <int>,
"level": <string>,
"end": <int>
}
```
Expand All @@ -292,15 +292,15 @@ To send authentication credentials, use the auth command.
* **end** – end time of the client's session

* Any server that enabled authentication should wait for
this request to come in first before accepting any other
this request to come in first before accepting any other
`op` code from the client.
* Once the request comes in, it would verify the information
* Once the request comes in, it would verify the information
(in a ROS system, using `rosauth`; however, the verification
method is not tied to ROS).
method is not tied to ROS).
* If the authentication is good, the connection would be kept
and rosbridge would function as normal. If the authentication
is bad, the connection would be severed.
* In the case that authentication is not enabled on the server,
is bad, the connection would be severed.
* In the case that authentication is not enabled on the server,
this `op` code can be ignored.

### 3.4 ROS messages
Expand Down
2 changes: 1 addition & 1 deletion rosapi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ rosapi
* `~topics_glob` (string, default '')
* `~services_glob` (string, default '')
* `~params_glob` (string, default '')

```Note: By default the rosapi calls for details about topics, services, and parameters will return nothing. You must specify a list of allowed resources.```
Each of the glob parameters may contain an array of one or more match patterns. Resources that match any of the specified patterns will be returned by calls to the rosapi services.

Expand Down
Loading

0 comments on commit ef0e417

Please sign in to comment.