Skip to content

Commit ef0e417

Browse files
authored
Add pre-commit, format with black and isort (RobotWebTools#648)
1 parent 0ec6845 commit ef0e417

File tree

108 files changed

+2648
-1688
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+2648
-1688
lines changed

.github/workflows/pre-commit.yaml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: pre-commit
2+
3+
on:
4+
pull_request:
5+
workflow_dispatch:
6+
7+
jobs:
8+
pre-commit:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v2
14+
15+
- name: Setup Python
16+
uses: actions/setup-python@v2
17+
18+
- name: Run pre-commit
19+
uses: pre-commit/[email protected]

.pre-commit-config.yaml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Modified from https://github.com/ros-planning/moveit2/blob/d184714751b347a2389cf1e8742b1be94eed63b8/.pre-commit-config.yaml
2+
#
3+
# To use:
4+
#
5+
# pre-commit run -a
6+
#
7+
# Or:
8+
#
9+
# pre-commit install # (runs every time you commit in git)
10+
#
11+
# To update this file:
12+
#
13+
# pre-commit autoupdate
14+
#
15+
# See https://github.com/pre-commit/pre-commit
16+
17+
repos:
18+
# Standard hooks
19+
- repo: https://github.com/pre-commit/pre-commit-hooks
20+
rev: v4.0.1
21+
hooks:
22+
- id: check-added-large-files
23+
- id: check-case-conflict
24+
- id: check-json
25+
- id: check-merge-conflict
26+
- id: check-symlinks
27+
- id: check-toml
28+
- id: check-yaml
29+
- id: debug-statements
30+
- id: destroyed-symlinks
31+
- id: detect-private-key
32+
- id: end-of-file-fixer
33+
- id: mixed-line-ending
34+
- id: pretty-format-json
35+
- id: trailing-whitespace
36+
37+
- repo: https://github.com/psf/black
38+
rev: 21.9b0
39+
hooks:
40+
- id: black
41+
args: ["--line-length=100"]
42+
43+
- repo: https://github.com/pycqa/isort
44+
rev: 5.8.0
45+
hooks:
46+
- id: isort
47+
name: isort (python)

AUTHORS.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ Contributors
1111
* Brandon Alexander ([email protected])
1212
* David Bertram ([email protected])
1313
* Matthias Gruhler ([email protected])
14-
* Travis Prosser ([email protected])
14+
* Travis Prosser ([email protected])

CHANGELOG.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ DEVEL
1616
* more natural json for call service result (OTL)
1717
* Add service call fail handling (OTL)
1818

19-
2013-07-16 - **0.5.0**
19+
2013-07-16 - **0.5.0**
2020
* Adds travis CI script (rctoris)
2121
* current authentication op code added (rctoris)
2222
* Removes global bin installation (jihoonl)
@@ -45,4 +45,3 @@ DEVEL
4545
* Fixes "int is not iterable" bug (baalexander)
4646
* Catkinizes tests (baalexander)
4747
* Catkinizes packages (baalexander)
48-

LICENSE

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ are met:
1313
copyright notice, this list of conditions and the following
1414
disclaimer in the documentation and/or other materials provided
1515
with the distribution.
16-
* Neither the name of Robert Bosch LLC, Willow Garage Inc.,
17-
Worcester Polytechnic Institute, Yujin Robot nor the names of its
18-
contributors may be used to endorse or promote products derived
16+
* Neither the name of Robert Bosch LLC, Willow Garage Inc.,
17+
Worcester Polytechnic Institute, Yujin Robot nor the names of its
18+
contributors may be used to endorse or promote products derived
1919
from this software without specific prior written permission.
2020

2121
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS

ROSBRIDGE_PROTOCOL.md

+13-13
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ message is dropped.
261261

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

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

274274
```json
275-
{ "op": "auth",
276-
"mac": <string>,
277-
"client": <string>,
278-
"dest": <string>,
279-
"rand": <string>,
280-
"t": <int>,
281-
"level": <string>,
275+
{ "op": "auth",
276+
"mac": <string>,
277+
"client": <string>,
278+
"dest": <string>,
279+
"rand": <string>,
280+
"t": <int>,
281+
"level": <string>,
282282
"end": <int>
283283
}
284284
```
@@ -292,15 +292,15 @@ To send authentication credentials, use the auth command.
292292
* **end** – end time of the client's session
293293

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

306306
### 3.4 ROS messages

rosapi/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ rosapi
66
* `~topics_glob` (string, default '')
77
* `~services_glob` (string, default '')
88
* `~params_glob` (string, default '')
9-
9+
1010
```Note: By default the rosapi calls for details about topics, services, and parameters will return nothing. You must specify a list of allowed resources.```
1111
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.
1212

0 commit comments

Comments
 (0)