-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
- Loading branch information
Showing
17 changed files
with
271 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# This is a format job. Pre-commit has a first-party GitHub action, so we use | ||
# that: https://github.com/pre-commit/action | ||
|
||
name: Format | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
|
||
jobs: | ||
pre-commit: | ||
name: Format | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.10.6 | ||
- uses: pre-commit/[email protected] | ||
with: | ||
extra_args: --all-files --hook-stage manual |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
# 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.1.0 | ||
hooks: | ||
- id: check-added-large-files | ||
- id: check-ast | ||
- id: check-case-conflict | ||
- id: check-docstring-first | ||
- id: check-merge-conflict | ||
- id: check-symlinks | ||
- id: check-xml | ||
- id: check-yaml | ||
- id: debug-statements | ||
- id: end-of-file-fixer | ||
- id: mixed-line-ending | ||
- id: trailing-whitespace | ||
exclude_types: [rst] | ||
- id: fix-byte-order-marker | ||
|
||
|
||
# Python hooks | ||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v2.31.1 | ||
hooks: | ||
- id: pyupgrade | ||
args: [--py36-plus] | ||
|
||
# Flake8 | ||
- repo: https://github.com/pycqa/flake8 | ||
rev: 4.0.1 | ||
hooks: | ||
- id: flake8 | ||
args: ["--extend-ignore=E501"] | ||
|
||
# Cmake hooks | ||
- repo: local | ||
hooks: | ||
- id: ament_lint_cmake | ||
name: ament_lint_cmake | ||
description: Check format of CMakeLists.txt files. | ||
stages: [commit] | ||
entry: ament_lint_cmake | ||
language: system | ||
files: CMakeLists\.txt$ | ||
|
||
# Docs - RestructuredText hooks | ||
- repo: https://github.com/PyCQA/doc8 | ||
rev: 0.10.1 | ||
hooks: | ||
- id: doc8 | ||
args: ['--max-line-length=100', '--ignore=D001'] | ||
exclude: CHANGELOG\.rst$ | ||
|
||
- repo: https://github.com/pre-commit/pygrep-hooks | ||
rev: v1.9.0 | ||
hooks: | ||
- id: rst-backticks | ||
exclude: CHANGELOG\.rst$ | ||
- id: rst-directive-colons | ||
- id: rst-inline-touching-normal | ||
|
||
# Spellcheck in comments and docs | ||
# skipping of *.svg files is not working... | ||
- repo: https://github.com/codespell-project/codespell | ||
rev: v2.1.0 | ||
hooks: | ||
- id: codespell | ||
args: ['--write-changes'] | ||
exclude: CHANGELOG\.rst|\.(svg|pyc)$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
<name>rqt_gauges_2</name> | ||
<version>0.0.1</version> | ||
<description>Visualization plugin for several sensors.</description> | ||
|
||
<maintainer email="[email protected]">Eloy Bricneo</maintainer> | ||
|
||
<license file="LICENSE">BSD Clause 3</license> | ||
|
@@ -16,6 +16,9 @@ | |
<exec_depend>rqt_gui</exec_depend> | ||
<exec_depend>rqt_gui_py</exec_depend> | ||
|
||
<test_depend>ament_flake8</test_depend> | ||
<test_depend>ament_xmllint</test_depend> | ||
|
||
<export> | ||
<architecture_independent/> | ||
<build_type>ament_python</build_type> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[pytest] | ||
junit_family=xunit2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
import sys | ||
|
||
from rqt_gui.main import Main | ||
from rqt_gauges_2.speedometer import Speedometer | ||
|
||
|
||
def main(): | ||
plugin = 'rqt_gauges_2.speedometer.Speedometer' | ||
main = Main(filename=plugin) | ||
sys.exit(main.main(sys.argv, standalone=plugin)) | ||
|
||
|
||
if __name__ == '__main__': | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
from qt_gui.plugin import Plugin | ||
from .speedometer_widget import * | ||
|
||
from .speedometer_widget import SpeedometerWidget | ||
|
||
|
||
class Speedometer(Plugin): | ||
|
||
def __init__(self, context): | ||
super(Speedometer, self).__init__(context) | ||
super().__init__(context) | ||
self.setObjectName('Speedometer') | ||
|
||
self._context = context | ||
self._node = context.node | ||
|
||
self._widget = SpeedometerWidget(self._node) | ||
context.add_widget(self._widget) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.