diff --git a/.travis.yml b/.travis.yml index 376631716680dbce57c798a25a612167124ba642..87de895ddadfafb644a49ef6887b1321cf29ef53 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,6 @@ os: - linux env: - JOB=check_style - - JOB=check_api addons: ssh_known_hosts: 13.229.163.131 before_install: diff --git a/paddle/scripts/paddle_build.sh b/paddle/scripts/paddle_build.sh index a1b5098a564398b8d019bd5633b176f913c126c3..9899eee8841147a509b7997fd905a1b68bc098da 100755 --- a/paddle/scripts/paddle_build.sh +++ b/paddle/scripts/paddle_build.sh @@ -753,32 +753,6 @@ EOF ./clean.sh } -function travis_check_api() { - mkdir -p ${PADDLE_ROOT}/build - cd ${PADDLE_ROOT}/build - cmake .. \ - -DCMAKE_BUILD_TYPE=Release \ - -DWITH_GPU=OFF \ - -DWITH_MKL=OFF - build - assert_api_not_changed cp27-cp27m - assert_api_spec_approvals - pip uninstall paddlepaddle -} - -function travis_check_api_py35() { - mkdir -p ${PADDLE_ROOT}/build - cd ${PADDLE_ROOT}/build - cmake .. \ - -DPY_VERSION=3.5 \ - -DCMAKE_BUILD_TYPE=Release \ - -DWITH_GPU=OFF \ - -DWITH_MKL=OFF - build - assert_api_not_changed cp35-cp35m - assert_api_spec_approvals -} - function main() { local CMD=$1 init @@ -864,10 +838,6 @@ function main() { test_fluid_lib) test_fluid_lib ;; - check_api) - travis_check_api - travis_check_api_py35 - ;; *) print_usage exit 0 diff --git a/tools/print_signatures.py b/tools/print_signatures.py index c56f30f724ca9f183d6c5cac427411b7711739a4..d32b247342cc0c37b7bcff7b676cb47a4f429dfd 100644 --- a/tools/print_signatures.py +++ b/tools/print_signatures.py @@ -51,6 +51,8 @@ def visit_member(parent_name, member): all = (args, doc) member_dict[cur_name] = all except TypeError: # special for PyBind method + if cur_name in check_modules_list: + return member_dict[cur_name] = " ".join([ line.strip() for line in pydoc.render_doc(member).split('\n') if "->" in line @@ -78,6 +80,7 @@ def visit_all_module(mod): visit_member(mod.__name__, instance) +check_modules_list = ["paddle.reader.ComposeNotAligned.__init__"] modules = sys.argv[1].split(",") for m in modules: visit_all_module(importlib.import_module(m))