Skip to content

Commit e72b40b

Browse files
authored
Merge pull request #100 from hungpham2511/release-v0.3.0
Release v0.3.0
2 parents 60fcfe2 + 96ad8dc commit e72b40b

File tree

105 files changed

+5010
-822
lines changed

Some content is hidden

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

105 files changed

+5010
-822
lines changed

.circleci/README.md

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# CI
2+
3+
We have the following CI workflows in CirclCI.
4+
5+
## integrate
6+
7+
The main workflow for new commits. The following jobs are done:
8+
- Check project codestyle.
9+
- Build and test toppra on Python 3.
10+
- Build and test toppra (C++).
11+
12+
## release
13+
14+
Check release branch for proper version.
15+
16+
17+
## publish
18+
19+
Publish source code to venues (PyPI). NOTE: This is currently not done.
20+
21+
22+
# Github Action
23+
Some tasks are done directly with Github Action.
24+
25+
- Linting for C++ code with clang-tidy.
26+
27+
Note: `cppcoreguidelines-pro-bounds-array-to-pointer-decay` leads to false reported error, thus disabled.
28+

.circleci/config.yml

+32-33
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
version: 2
2+
23
jobs:
34
check-codestyle:
45
docker:
@@ -34,7 +35,7 @@ jobs:
3435
path: test-reports
3536
destination: test-reports
3637

37-
test-python-3:
38+
build-python-3:
3839
docker:
3940
- image: hungpham2511/toppra-dep:0.0.3
4041

@@ -51,7 +52,7 @@ jobs:
5152
- run:
5253
name: install dependencies
5354
command: |
54-
python3 -m virtualenv --python python3 venv3 && . venv3/bin/activate
55+
virtualenv --python python3.7 venv3 && . venv3/bin/activate
5556
pip install invoke pathlib2 numpy cython
5657
invoke install-solvers
5758
pip install -e .[dev]
@@ -66,53 +67,45 @@ jobs:
6667
command: |
6768
. venv3/bin/activate
6869
mkdir test-reports
69-
pytest -q tests --durations=3 --junitxml=test-reports/junit.xml
70+
python --version
71+
python -m pytest -q tests --durations=3 --junitxml=test-reports/junit.xml
7072
7173
- store_test_results:
7274
path: test-reports
7375

74-
test-python-2:
76+
build-cpp:
7577
docker:
7678
- image: hungpham2511/toppra-dep:0.0.3
7779

7880
working_directory: ~/repo
7981

8082
steps:
8183
- checkout
82-
- restore_cache:
83-
keys:
84-
- v1-dependencies2-{{ checksum "requirements.txt" }}
85-
8684
- run:
87-
name: install dependencies
85+
name: dependencies
8886
command: |
89-
python -m pip install virtualenv --user
90-
python -m virtualenv venv && . venv/bin/activate
91-
python -m pip install invoke pathlib2 numpy cython
92-
python -m invoke install-solvers
93-
pip install -e .[dev]
94-
95-
- save_cache:
96-
paths:
97-
- ./venv
98-
key: v1-dependencies2-{{ checksum "requirements.txt" }}
87+
sudo apt install -y curl
88+
echo "deb [arch=amd64] http://robotpkg.openrobots.org/packages/debian/pub $(lsb_release -sc) robotpkg" \
89+
| sudo tee /etc/apt/sources.list.d/robotpkg.list
90+
curl http://robotpkg.openrobots.org/packages/debian/robotpkg.key \
91+
| sudo apt-key add -
92+
sudo apt update
93+
sudo apt install -y clang-tidy libeigen3-dev robotpkg-pinocchio robotpkg-qpoases libglpk-dev
9994
10095
- run:
101-
name: test
96+
name: build
10297
command: |
103-
. venv/bin/activate
104-
export PYTHONPATH=$PYTHONPATH:`openrave-config --python-dir`
105-
mkdir test-reports
106-
pytest --durations=3 --junitxml=test-reports/junit.xml
98+
export LD_LIBRARY_PATH=/opt/openrobots/lib:${LD_LIBRARY_PATH}
99+
export CMAKE_PREFIX_PATH=/opt/openrobots
100+
mkdir build && cd build && cmake -DBUILD_WITH_PINOCCHIO=ON -DBUILD_WITH_qpOASES=ON -DBUILD_WITH_GLPK=ON ..
101+
make -j4
102+
working_directory: ~/repo/cpp
107103

108104
- run:
109-
name: Collect log data
105+
name: test
110106
command: |
111-
cp /tmp/toppra.log ~/repo/test-reports/
112-
113-
- store_test_results:
114-
path: test-reports
115-
destination: test-reports
107+
./tests/all_tests
108+
working_directory: ~/repo/cpp/build
116109

117110
pre-release:
118111
docker:
@@ -147,11 +140,14 @@ jobs:
147140
148141
workflows:
149142
version: 2
150-
test-and-lint:
143+
integrate:
151144
jobs:
152-
- test-python-2
153-
- test-python-3
145+
- build-cpp
154146
- check-codestyle
147+
- build-python-3:
148+
requires:
149+
- check-codestyle
150+
155151
release:
156152
jobs:
157153
- pre-release:
@@ -160,6 +156,9 @@ workflows:
160156
only:
161157
- fix-ci
162158
- /release-.*/
159+
160+
publish:
161+
jobs:
163162
- release:
164163
filters:
165164
branches:

.clang-format

+117
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
---
2+
Language: Cpp
3+
# BasedOnStyle: Google
4+
AccessModifierOffset: -1
5+
AlignAfterOpenBracket: Align
6+
AlignConsecutiveAssignments: false
7+
AlignConsecutiveDeclarations: false
8+
AlignEscapedNewlines: Left
9+
AlignOperands: true
10+
AlignTrailingComments: true
11+
AllowAllParametersOfDeclarationOnNextLine: true
12+
AllowShortBlocksOnASingleLine: false
13+
AllowShortCaseLabelsOnASingleLine: false
14+
AllowShortFunctionsOnASingleLine: All
15+
AllowShortIfStatementsOnASingleLine: true
16+
AllowShortLoopsOnASingleLine: true
17+
AlwaysBreakAfterDefinitionReturnType: None
18+
AlwaysBreakAfterReturnType: None
19+
AlwaysBreakBeforeMultilineStrings: true
20+
AlwaysBreakTemplateDeclarations: true
21+
BinPackArguments: true
22+
BinPackParameters: true
23+
BraceWrapping:
24+
AfterClass: false
25+
AfterControlStatement: false
26+
AfterEnum: false
27+
AfterFunction: false
28+
AfterNamespace: false
29+
AfterObjCDeclaration: false
30+
AfterStruct: false
31+
AfterUnion: false
32+
AfterExternBlock: false
33+
BeforeCatch: false
34+
BeforeElse: false
35+
IndentBraces: false
36+
SplitEmptyFunction: true
37+
SplitEmptyRecord: true
38+
SplitEmptyNamespace: true
39+
BreakBeforeBinaryOperators: None
40+
BreakBeforeBraces: Attach
41+
BreakBeforeInheritanceComma: false
42+
BreakBeforeTernaryOperators: true
43+
BreakConstructorInitializersBeforeComma: false
44+
BreakConstructorInitializers: BeforeColon
45+
BreakAfterJavaFieldAnnotations: false
46+
BreakStringLiterals: true
47+
ColumnLimit: 88
48+
CommentPragmas: '^ IWYU pragma:'
49+
CompactNamespaces: false
50+
ConstructorInitializerAllOnOneLineOrOnePerLine: true
51+
ConstructorInitializerIndentWidth: 4
52+
ContinuationIndentWidth: 4
53+
Cpp11BracedListStyle: true
54+
DerivePointerAlignment: true
55+
DisableFormat: false
56+
ExperimentalAutoDetectBinPacking: false
57+
FixNamespaceComments: true
58+
ForEachMacros:
59+
- foreach
60+
- Q_FOREACH
61+
- BOOST_FOREACH
62+
IncludeBlocks: Preserve
63+
IncludeCategories:
64+
- Regex: '^<ext/.*\.h>'
65+
Priority: 2
66+
- Regex: '^<.*\.h>'
67+
Priority: 1
68+
- Regex: '^<.*'
69+
Priority: 2
70+
- Regex: '.*'
71+
Priority: 3
72+
IncludeIsMainRegex: '([-_](test|unittest))?$'
73+
IndentCaseLabels: true
74+
IndentPPDirectives: None
75+
IndentWidth: 2
76+
IndentWrappedFunctionNames: false
77+
JavaScriptQuotes: Leave
78+
JavaScriptWrapImports: true
79+
KeepEmptyLinesAtTheStartOfBlocks: false
80+
MacroBlockBegin: ''
81+
MacroBlockEnd: ''
82+
MaxEmptyLinesToKeep: 1
83+
NamespaceIndentation: None
84+
ObjCBlockIndentWidth: 2
85+
ObjCSpaceAfterProperty: false
86+
ObjCSpaceBeforeProtocolList: false
87+
PenaltyBreakAssignment: 2
88+
PenaltyBreakBeforeFirstCallParameter: 1
89+
PenaltyBreakComment: 300
90+
PenaltyBreakFirstLessLess: 120
91+
PenaltyBreakString: 1000
92+
PenaltyExcessCharacter: 1000000
93+
PenaltyReturnTypeOnItsOwnLine: 200
94+
PointerAlignment: Left
95+
RawStringFormats:
96+
- Delimiter: pb
97+
Language: TextProto
98+
BasedOnStyle: google
99+
ReflowComments: true
100+
SortIncludes: true
101+
SortUsingDeclarations: true
102+
SpaceAfterCStyleCast: false
103+
SpaceAfterTemplateKeyword: true
104+
SpaceBeforeAssignmentOperators: true
105+
SpaceBeforeParens: ControlStatements
106+
SpaceInEmptyParentheses: false
107+
SpacesBeforeTrailingComments: 2
108+
SpacesInAngles: false
109+
SpacesInContainerLiterals: true
110+
SpacesInCStyleCastParentheses: false
111+
SpacesInParentheses: false
112+
SpacesInSquareBrackets: false
113+
Standard: Auto
114+
TabWidth: 8
115+
UseTab: Never
116+
...
117+

.github/ISSUE_TEMPLATE/bug_report.md

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: 'Type: bug'
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1.
16+
2.
17+
18+
**Expected behavior**
19+
A clear and concise description of what you expected to happen.
20+
21+
**Screenshots**
22+
If applicable, add screenshots to help explain your problem.
23+
24+
**Version**
25+
Branch, commit, version?
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/pull_request_template.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Fixes #
2+
3+
Changes in this PRs:
4+
-
5+
-
6+
7+
Checklists:
8+
- [ ] Update CHANGELOG.md with a single line describing this PR

.github/workflows/main.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Lint (C++, clang-tidy)
2+
3+
on:
4+
push:
5+
branches: [ develop ]
6+
pull_request:
7+
branches: [ develop ]
8+
9+
jobs:
10+
lint:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
15+
- uses: actions/checkout@v2
16+
17+
- name: Install deps
18+
run: |
19+
sudo apt install -y curl
20+
echo "deb [arch=amd64] http://robotpkg.openrobots.org/packages/debian/pub $(lsb_release -sc) robotpkg" \
21+
| sudo tee /etc/apt/sources.list.d/robotpkg.list
22+
curl http://robotpkg.openrobots.org/packages/debian/robotpkg.key \
23+
| sudo apt-key add -
24+
sudo apt update
25+
sudo apt install -y clang-tidy libeigen3-dev robotpkg-pinocchio robotpkg-qpoases
26+
27+
- name: Lint
28+
run: |
29+
cd $GITHUB_WORKSPACE/cpp
30+
export LD_LIBRARY_PATH=/opt/openrobots/lib:${LD_LIBRARY_PATH}
31+
export CMAKE_PREFIX_PATH=/opt/openrobots
32+
mkdir build && cd build && cmake -DBUILD_WITH_PINOCCHIO=ON -DBUILD_WITH_qpOASES=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=1 ..
33+
clang-tidy src/**/*.cpp \
34+
-checks=clang-analyzer-*,clang-analyzer-cplusplus*,cppcoreguidelines-*,performance-*,modernize-*,readability-,-cppcoreguidelines-pro-bounds-array-to-pointer-decay\
35+
-warnings-as-errors=clang-analyzer-*,clang-analyzer-cplusplus*,cppcoreguidelines-*,modernize-*

.gitmodules

Whitespace-only changes.

.pylintrc

+1
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ disable=
142142
xrange-builtin,
143143
xreadlines-attribute,
144144
zip-builtin-not-iterating,
145+
bad-continuation
145146

146147
# Enable the message, report, category or checker with the given id(s). You can
147148
# either give multiple identifier separated by comma (,) or put this option

0 commit comments

Comments
 (0)