Skip to content

Commit

Permalink
Merge pull request #77 from hungpham2511/release-0.2.3
Browse files Browse the repository at this point in the history
Release 0.2.3
  • Loading branch information
hungpham2511 authored Jan 25, 2020
2 parents fb8f767 + edaa85e commit 60fcfe2
Show file tree
Hide file tree
Showing 40 changed files with 872 additions and 535 deletions.
129 changes: 71 additions & 58 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,56 +2,41 @@ version: 2
jobs:
check-codestyle:
docker:
- image: hungpham2511/toppra-dep:0.0.2
- image: hungpham2511/toppra-dep:0.0.3

working_directory: ~/repo

steps:
- checkout

# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies3-{{ checksum "requirements3.txt" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies3-

- run:
name: install dependencies
command: |
python3 -m venv venv3
. venv3/bin/activate
# main deps
pip install -r requirements3.txt
git clone https://github.com/hungpham2511/qpOASES && cd qpOASES/ && mkdir bin && make && cd interfaces/python/ && python setup.py install
# test deps
pip install cvxpy cvxopt pytest pytest-cov pandas tabulate pylint pydocstyle pycodestyle
python3 -m virtualenv --python python3 venv3 && . venv3/bin/activate
pip install invoke pathlib2 numpy cython
invoke install-solvers
pip install -e .[dev]
- save_cache:
paths:
- ./venv3
key: v1-dependencies3-{{ checksum "requirements3.txt" }}

# build install
- run:
name: build and install
command: |
. venv3/bin/activate
python setup.py develop
- run:
name: check codestyle
command: |
. venv3/bin/activate
make lint
invoke lint || echo "allow failure"
- store_artifacts:
path: test-reports
destination: test-reports

test-python-3:
docker:
- image: hungpham2511/toppra-dep:0.0.2
- image: hungpham2511/toppra-dep:0.0.3

working_directory: ~/repo

Expand All @@ -62,32 +47,20 @@ jobs:
- restore_cache:
keys:
- v1-dependencies3-{{ checksum "requirements3.txt" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies3-

- run:
name: install dependencies
command: |
python3 -m venv venv3
. venv3/bin/activate
# main deps
pip install -r requirements3.txt
git clone https://github.com/hungpham2511/qpOASES && cd qpOASES/ && mkdir bin && make && cd interfaces/python/ && python setup.py install
# test deps
pip install cvxpy cvxopt pytest pytest-cov pandas tabulate pylint pydocstyle pycodestyle
python3 -m virtualenv --python python3 venv3 && . venv3/bin/activate
pip install invoke pathlib2 numpy cython
invoke install-solvers
pip install -e .[dev]
- save_cache:
paths:
- ./venv3
key: v1-dependencies3-{{ checksum "requirements3.txt" }}

# build install
- run:
name: build and install
command: |
. venv3/bin/activate
python setup.py develop
- run:
name: test
command: |
Expand All @@ -100,53 +73,77 @@ jobs:

test-python-2:
docker:
- image: hungpham2511/toppra-dep:0.0.2
- image: hungpham2511/toppra-dep:0.0.3

working_directory: ~/repo

steps:
- checkout

# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies2-{{ checksum "requirements.txt" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies2-

- run:
name: install dependencies
command: |
pip install virtualenv
python -m virtualenv venv
. venv/bin/activate
# main deps
pip install -r requirements.txt
git clone https://github.com/hungpham2511/qpOASES && cd qpOASES/ && mkdir bin && make && cd interfaces/python/ && python setup.py install
# test deps
pip install cvxpy==0.4.11 cvxopt pytest pytest-cov pandas tabulate pylint pydocstyle pycodestyle pathlib2
python -m pip install virtualenv --user
python -m virtualenv venv && . venv/bin/activate
python -m pip install invoke pathlib2 numpy cython
python -m invoke install-solvers
pip install -e .[dev]
- save_cache:
paths:
- ./venv
key: v1-dependencies2-{{ checksum "requirements.txt" }}

- run:
name: build and install
command: |
. venv/bin/activate
python setup.py develop
- run:
name: test
command: |
. venv/bin/activate
export PYTHONPATH=$PYTHONPATH:`openrave-config --python-dir`
mkdir test-reports
pytest -q tests --durations=3 --junitxml=test-reports/junit.xml
pytest --durations=3 --junitxml=test-reports/junit.xml
- run:
name: Collect log data
command: |
cp /tmp/toppra.log ~/repo/test-reports/
- store_test_results:
path: test-reports
destination: test-reports

pre-release:
docker:
- image: buildpack-deps:trusty
working_directory: ~/repo
steps:
- checkout
- run:
name: Pull all known tags and check that the tag in VERSION has not already exist.
command: |
VERSION=`cat VERSION`
git fetch --tags
git tag $VERSION
release:
docker:
- image: buildpack-deps:trusty
working_directory: ~/repo
steps:
- checkout
- run:
name: Tag code with the latest version in VERSION and push tag.
command: |
VERSION=`cat VERSION`
git fetch --tags
git tag $VERSION
git push origin $VERSION
- run:
name: Publish to PyPI
command: |
echo "TODO"
workflows:
version: 2
Expand All @@ -155,3 +152,19 @@ workflows:
- test-python-2
- test-python-3
- check-codestyle
release:
jobs:
- pre-release:
filters:
branches:
only:
- fix-ci
- /release-.*/
- release:
filters:
branches:
only:
- master



138 changes: 70 additions & 68 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -54,92 +54,94 @@ confidence=
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use"--disable=all --enable=classes
# --disable=W"
disable=print-statement,
parameter-unpacking,
unpacking-in-except,
old-raise-syntax,
disable=
fixme,anomalous-backslash-in-string
len-as-condition,
no-member,
parameter-unpacking,
superfluous-parens,
too-few-public-methods,
unsubscriptable-object,
useless-object-inheritance,
apply-builtin,
backtick,
long-suffix,
old-ne-operator,
old-octal-literal,
import-star-module-level,
non-ascii-bytes-literal,
invalid-unicode-literal,
raw-checker-failed,
bad-inline-option,
locally-disabled,
locally-enabled,
file-ignored,
suppressed-message,
useless-suppression,
deprecated-pragma,
apply-builtin,
bad-python3-import,
basestring-builtin,
buffer-builtin,
cmp-builtin,
cmp-method,
coerce-builtin,
execfile-builtin,
file-builtin,
long-builtin,
raw_input-builtin,
reduce-builtin,
standarderror-builtin,
unicode-builtin,
xrange-builtin,
coerce-method,
comprehension-escape,
delslice-method,
getslice-method,
setslice-method,
no-absolute-import,
old-division,
deprecated-itertools-function,
deprecated-operator-function,
deprecated-pragma,
deprecated-str-translate-call,
deprecated-string-function,
deprecated-sys-function,
deprecated-types-field,
deprecated-urllib-function,
dict-items-not-iterating,
dict-iter-method,
dict-keys-not-iterating,
dict-values-not-iterating,
dict-view-method,
next-method-called,
metaclass-assignment,
indexing-exception,
raising-string,
reload-builtin,
oct-method,
div-method,
eq-without-hash,
exception-escape,
exception-message-attribute,
execfile-builtin,
file-builtin,
file-ignored,
filter-builtin-not-iterating,
getslice-method,
hex-method,
nonzero-method,
cmp-method,
idiv-method,
import-star-module-level,
indexing-exception,
input-builtin,
round-builtin,
intern-builtin,
unichr-builtin,
invalid-str-codec,
invalid-unicode-literal,
locally-disabled,
locally-enabled,
long-builtin,
long-suffix,
map-builtin-not-iterating,
zip-builtin-not-iterating,
metaclass-assignment,
next-method-called,
next-method-defined,
no-absolute-import,
non-ascii-bytes-literal,
nonzero-method,
oct-method,
old-division,
old-ne-operator,
old-octal-literal,
old-raise-syntax,
print-statement,
raising-string,
range-builtin-not-iterating,
filter-builtin-not-iterating,
using-cmp-argument,
eq-without-hash,
div-method,
idiv-method,
raw-checker-failed,
raw_input-builtin,
rdiv-method,
exception-message-attribute,
invalid-str-codec,
reduce-builtin,
reload-builtin,
round-builtin,
setslice-method,
standarderror-builtin,
suppressed-message,
sys-max-int,
bad-python3-import,
deprecated-string-function,
deprecated-str-translate-call,
deprecated-itertools-function,
deprecated-types-field,
next-method-defined,
dict-items-not-iterating,
dict-keys-not-iterating,
dict-values-not-iterating,
deprecated-operator-function,
deprecated-urllib-function,
unichr-builtin,
unicode-builtin,
unpacking-in-except,
useless-suppression,
using-cmp-argument,
xrange-builtin,
xreadlines-attribute,
deprecated-sys-function,
exception-escape,
comprehension-escape,
len-as-condition,
superfluous-parens,
no-member,
too-few-public-methods,
fixme,anomalous-backslash-in-string

zip-builtin-not-iterating,

# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
Expand Down
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
recursive-include toppra *.pyx
include requirements.txt
include requirements3.txt
include VERSION
Loading

0 comments on commit 60fcfe2

Please sign in to comment.