From 6a9d825d6adac8ab1a5e49b27c20d5b20cb27025 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mihai=20Capot=C4=83?= Date: Thu, 1 Feb 2018 18:43:46 -0800 Subject: [PATCH 1/5] dev: Configure coverage for multiprocessing --- pr-check.sh | 1 - run-tests.sh | 3 +++ setup.cfg | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pr-check.sh b/pr-check.sh index 045d73e4e..85006e44c 100755 --- a/pr-check.sh +++ b/pr-check.sh @@ -69,7 +69,6 @@ function exit_with_error { function exit_with_error_and_venv { $deactivate_venv cd $basedir - rm -f .coverage.* $remove_venv $venv exit_with_error "$1" } diff --git a/run-tests.sh b/run-tests.sh index fc1b18da5..50c6d875a 100755 --- a/run-tests.sh +++ b/run-tests.sh @@ -38,6 +38,9 @@ then fi $mpi_command -n 2 coverage run -m pytest +# Coverage produces empty files which trigger warnings on combine +find . -name ".coverage.*" -size 0 -print0 | xargs -0 rm + coverage combine # Travis error workaround diff --git a/setup.cfg b/setup.cfg index 80bfe24c9..f7429fbc3 100644 --- a/setup.cfg +++ b/setup.cfg @@ -15,6 +15,7 @@ ignore = [coverage:run] source = brainiak branch = True +concurrency = multiprocessing parallel = True [coverage:report] From 9d20aa41e0b1c2e3f92879b8377e40ec5fbf74a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mihai=20Capot=C4=83?= Date: Thu, 1 Feb 2018 18:58:39 -0800 Subject: [PATCH 2/5] Coverage does not always produce empty files --- run-tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run-tests.sh b/run-tests.sh index 50c6d875a..f1a756d38 100755 --- a/run-tests.sh +++ b/run-tests.sh @@ -39,7 +39,7 @@ fi $mpi_command -n 2 coverage run -m pytest # Coverage produces empty files which trigger warnings on combine -find . -name ".coverage.*" -size 0 -print0 | xargs -0 rm +find . -name ".coverage.*" -size 0 -print0 | xargs -0 rm -f coverage combine From 1682df4dfaef1929f65a744e88f769fb6252de3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mihai=20Capot=C4=83?= Date: Thu, 1 Feb 2018 19:43:13 -0800 Subject: [PATCH 3/5] Add Codecov integration --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 1dda25b66..af49ccd52 100644 --- a/.travis.yml +++ b/.travis.yml @@ -41,7 +41,9 @@ matrix: before_install: *macos_before_install install: - - python3 -m pip install -U pip + - python3 -m pip install -U pip codecov script: - ./pr-check.sh +after_success: + - codecov From d699ee12eccf5d9d4aea62b64904f8050526cdef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mihai=20Capot=C4=83?= Date: Thu, 1 Feb 2018 19:56:28 -0800 Subject: [PATCH 4/5] Disable run-tests coverage error to enable Codecov --- run-tests.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/run-tests.sh b/run-tests.sh index f1a756d38..3271dde2a 100755 --- a/run-tests.sh +++ b/run-tests.sh @@ -61,6 +61,5 @@ rm $coverage_report if [ $report_exit_code = 2 ] then - echo "ERROR: Coverage too low." + echo "WARNING: Coverage too low." fi -exit $report_exit_code From 1a2fd8093c0e258e37c4d6a37aeb571ebcfa353b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mihai=20Capot=C4=83?= Date: Fri, 2 Feb 2018 15:13:05 -0800 Subject: [PATCH 5/5] Disable Codecov comments --- .codecov.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 .codecov.yml diff --git a/.codecov.yml b/.codecov.yml new file mode 100644 index 000000000..69cb76019 --- /dev/null +++ b/.codecov.yml @@ -0,0 +1 @@ +comment: false