-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add more testing/linting
- Loading branch information
Showing
22 changed files
with
702 additions
and
48 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,5 @@ | ||
[settings] | ||
combine_as_imports = true | ||
line_length = 120 | ||
profile = black | ||
skip_gitignore = true |
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,23 +4,24 @@ | |
<name>pykdl_ros</name> | ||
<version>0.0.0</version> | ||
<description>Stamped PyKDL classes</description> | ||
|
||
<author email="[email protected]">Matthijs van der Burgh</author> | ||
|
||
<maintainer email="[email protected]">Matthijs van der Burgh</maintainer> | ||
|
||
<license>BSD</license> | ||
|
||
<url type="bugtracker">https://github.com/tue-robotics/pykdl_ros/issues</url> | ||
<url type="repository">https://github.com/tue-robotics/pykdl_ros</url> | ||
|
||
<author email="[email protected]">Matthijs van der Burgh</author> | ||
|
||
<exec_depend>builtin_interfaces</exec_depend> | ||
<exec_depend>python_orocos_kdl_vendor</exec_depend> | ||
<exec_depend>std_msgs</exec_depend> | ||
|
||
<test_depend>ament_copyright</test_depend> | ||
<test_depend>ament_flake8</test_depend> | ||
<test_depend>ament_mypy</test_depend> | ||
<test_depend>ament_pep257</test_depend> | ||
<test_depend>ament_xmllint</test_depend> | ||
<test_depend>python3-flake8-isort</test_depend> | ||
<test_depend>python3-pytest</test_depend> | ||
|
||
<export> | ||
|
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,5 +1,22 @@ | ||
[tool.black] | ||
line-length = 120 | ||
|
||
[tool.flake8] | ||
max-line-length = 120 | ||
|
||
[tool.isort] | ||
combine_as_imports = true | ||
line_length = 120 | ||
profile = "black" | ||
skip_gitignore = true | ||
|
||
[tool.mypy] | ||
disallow_untyped_defs = true | ||
no_implicit_optional = true | ||
pretty = true | ||
show_error_codes = true | ||
warn_return_any = true | ||
warn_unused_ignores = true | ||
|
||
[tool.pytest.ini_options] | ||
filterwarnings = ["ignore:SelectableGroups dict interface is deprecated. Use select.:DeprecationWarning"] |
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,4 +1,5 @@ | ||
from os import path | ||
|
||
from setuptools import find_packages, setup | ||
|
||
package_name = "pykdl_ros" | ||
|
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
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,31 @@ | ||
# Copyright 2019 Canonical Ltd | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
import pytest | ||
from ament_mypy.main import main | ||
|
||
|
||
@pytest.mark.mypy | ||
@pytest.mark.linter | ||
def test_mypy(): | ||
try: | ||
import importlib.resources as _ # noqa: F401 | ||
except ModuleNotFoundError: | ||
# The importlib_resources package is a backport of the importlib.resources module | ||
# from Python 3.9. The 'policy' module of this project first tries to import from | ||
# importlib.resources, then falls back to the backport package. | ||
# There is a bug in mypy that manifests when this try/except import pattern is | ||
# used: https://github.com/python/mypy/issues/1153 | ||
pytest.skip("This platform does not support mypy checking of importlib properly") | ||
assert main(argv=[]) == 0, "Found errors" |
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Copyright 2019 Open Source Robotics Foundation, Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
import pytest | ||
from ament_xmllint.main import main | ||
|
||
|
||
@pytest.mark.linter | ||
@pytest.mark.xmllint | ||
def test_xmllint(): | ||
rc = main(argv=[]) | ||
assert rc == 0, "Found errors" |
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,5 @@ | ||
[settings] | ||
combine_as_imports = true | ||
line_length = 120 | ||
profile = black | ||
skip_gitignore = true |
Oops, something went wrong.