Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENH][TST] Feature/parallel integration #437

Merged
merged 8 commits into from
Nov 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 20 additions & 15 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ jobs:
source activate tedana_py37 # depends on makeenv37
make lint

build_docs:
three-echo:
docker:
- image: continuumio/miniconda3
working_directory: /tmp/src/tedana
Expand All @@ -139,17 +139,21 @@ jobs:
- restore_cache:
key: conda-py37-v1-{{ checksum "dev_requirements.txt" }}
- run:
name: Build docs
name: Run integration tests
no_output_timeout: 40m
command: |
apt-get install -yqq make
source activate tedana_py37 # depends on makeenv37
cd docs && make html doctest
mkdir /tmp/docs
mv /tmp/src/tedana/docs/_build/* /tmp/docs/
source activate tedana_py37 # depends on makeenv_37
make three-echo
mkdir /tmp/src/coverage
mv /tmp/src/tedana/.coverage /tmp/src/coverage/.coverage.three-echo
- store_artifacts:
path: /tmp/docs

integration:
path: /tmp/data
- persist_to_workspace:
root: /tmp
paths:
- src/coverage/.coverage.three-echo
five-echo:
docker:
- image: continuumio/miniconda3
working_directory: /tmp/src/tedana
Expand All @@ -163,15 +167,15 @@ jobs:
command: |
apt-get install -yqq make
source activate tedana_py37 # depends on makeenv_37
make integration
make five-echo
mkdir /tmp/src/coverage
mv /tmp/src/tedana/.coverage /tmp/src/coverage/.coverage.integration
mv /tmp/src/tedana/.coverage /tmp/src/coverage/.coverage.five-echo
- store_artifacts:
path: /tmp/data
- persist_to_workspace:
root: /tmp
paths:
- src/coverage/.coverage.integration
- src/coverage/.coverage.five-echo

merge_coverage:
working_directory: /tmp/src/tedana
Expand Down Expand Up @@ -209,15 +213,16 @@ workflows:
- style_check:
requires:
- makeenv_37
- integration:
- three-echo:
requires:
- makeenv_37
- build_docs:
- five-echo:
requires:
- makeenv_37
- merge_coverage:
requires:
- unittest_35
- unittest_36
- unittest_37
- integration
- three-echo
- five-echo
13 changes: 9 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
.PHONY: all lint

all_tests: lint unittest integration
all_tests: lint unittest three-echo five-echo

help:
@echo "Please use 'make <target>' where <target> is one of:"
@echo " lint to run flake8 on all Python files"
@echo " unittest to run unit tests on tedana"
@echo " integration to run integration tests on tedana"
@echo " three-echo to run the three-echo test set on tedana"
@echo " five-echo to run the five-echo test set on tedana"
@echo " all_tests to run 'lint', 'unittest', and 'integration'"

lint:
Expand All @@ -15,5 +16,9 @@ lint:
unittest:
@py.test --skipintegration --cov-append --cov-report term-missing --cov=tedana tedana/

integration:
@py.test --cov-append --cov-report term-missing --cov=tedana tedana/tests/test_integration.py
three-echo:
@py.test --cov-append --cov-report term-missing --cov=tedana -k test_integration_three_echo tedana/tests/test_integration.py

five-echo:
@py.test --cov-append --cov-report term-missing --cov=tedana -k test_integration_five_echo tedana/tests/test_integration.py

21 changes: 15 additions & 6 deletions dev_tools/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,22 @@ cprint() {
}


run_integration_tests() {
run_three_echo_test() {
#
# Runs tedana integration tests
# Runs tedana three-echo test
#

cprint "RUNNING INTEGRATION TESTS"
make integration
cprint "INTEGRATION TESTS PASSED !"
cprint "RUNNING THREE-ECHO TEST"
make three-echo
cprint "THREE-ECHO TEST PASSED !"
}

run_five_echo_test() {
#
# Runs tedana five-echo test
cprint "RUNNING FIVE-ECHO TEST"
make five-echo
cprint "FIVE-ECHO TEST PASSED !"
}


Expand Down Expand Up @@ -57,7 +65,8 @@ run_all_tests() {

run_lint_tests
run_unit_tests
run_integration_tests
run_three_echo_test
run_five_echo_test

cprint "FINISHED RUNNING ALL TESTS -- GREAT SUCCESS !"
}