<commit_before>machine:
  # XXX: btrfs circleCI fix, see: https://github.com/docker/docker/issues/9939 and https://github.com/Sabayon/docker-stage3-base-amd64/commit/8c1bf737113a278dd2f
  pre:
    - sudo curl -L -o /usr/bin/docker 'https://s3-external-1.amazonaws.com/circle-downloads/docker-1.9.0-circleci'
    - sudo chmod 0755 /usr/bin/docker
  services:
    - docker
  python:
    version: 2.7.11
  environment:
    CFLAGS: "-g -O0 -fprofile-arcs -ftest-coverage"
    CXXFLAGS: "-g -O0 -fprofile-arcs -ftest-coverage"
    LDFLAGS: "-g -O0 -fprofile-arcs -ftest-coverage"
dependencies:
  cache_directories:
    - "~/dcmqi/build"
    - "~/dcmqi/codecov-build"
    - "~/.pyenv"

  post:
    - sudo apt-get install lcov && sudo apt-get remove cmake &&  wget --no-check-certificate https://cmake.org/files/v3.6/cmake-3.6.0-rc4-Linux-x86_64.tar.gz && tar zxf cmake-3.6.0-rc4-Linux-x86_64.tar.gz && sudo cp -r cmake-3.6.0-rc4-Linux-x86_64/* /usr && cmake --version && mkdir codecov-build && cd codecov-build && ls -lat /usr/bin && /usr/bin/cmake  .. && make -j4 && cd dcmqi-build && ctest . && lcov --gcov-tool /usr/bin/gcov-4.9 --directory . --capture --output-file coverage.lcov && lcov --remove coverage.lcov '/usr/*' 'ITK/*' 'DCMTK/*' 'SlicerExecutionModel/*' 'jsoncpp/*' 'dcmqi-build/*' --output-file coverage_clean.lcov && bash <(curl -s https://codecov.io/bash) -X gcov -C ${CIRCLE_SHA1} -f coverage_clean.lcov -R ../..
    - cd docker && make dcmqi
    # Install package required by convert.py
    - pip install lxml==3.6.4
    - |
      cd docker && make dcmqi.test && \
      python ../util/junit/convert.py \
        ../build/dcmqi-build/ \
        ../util/junit/conv.xsl > ../build/BaseTest.xml
    # Install package required to automatically create or update GitHub releases
    - pip install scikit-ci-addons==0.14.0

test:
  post:
    - mkdir -p ${CIRCLE_TEST_REPORTS}/junit
    - cp ~/dcmqi/build/BaseTest.xml ${CIRCLE_TEST_REPORTS}/junit
<commit_msg>BUG: fix gcov path<commit_after>machine:
  # XXX: btrfs circleCI fix, see: https://github.com/docker/docker/issues/9939 and https://github.com/Sabayon/docker-stage3-base-amd64/commit/8c1bf737113a278dd2f
  pre:
    - sudo curl -L -o /usr/bin/docker 'https://s3-external-1.amazonaws.com/circle-downloads/docker-1.9.0-circleci'
    - sudo chmod 0755 /usr/bin/docker
  services:
    - docker
  python:
    version: 2.7.11
  environment:
    CFLAGS: "-g -O0 -fprofile-arcs -ftest-coverage"
    CXXFLAGS: "-g -O0 -fprofile-arcs -ftest-coverage"
    LDFLAGS: "-g -O0 -fprofile-arcs -ftest-coverage"
dependencies:
  cache_directories:
    - "~/dcmqi/build"
    - "~/dcmqi/codecov-build"
    - "~/.pyenv"

  post:
    - sudo apt-get install lcov && sudo apt-get remove cmake &&  wget --no-check-certificate https://cmake.org/files/v3.6/cmake-3.6.0-rc4-Linux-x86_64.tar.gz && tar zxf cmake-3.6.0-rc4-Linux-x86_64.tar.gz && sudo cp -r cmake-3.6.0-rc4-Linux-x86_64/* /usr && cmake --version && mkdir codecov-build && cd codecov-build && ls -lat /usr/bin && /usr/bin/cmake  .. && make -j4 && cd dcmqi-build && ctest . && lcov --directory . --capture --output-file coverage.lcov && lcov --remove coverage.lcov '/usr/*' 'ITK/*' 'DCMTK/*' 'SlicerExecutionModel/*' 'jsoncpp/*' 'dcmqi-build/*' --output-file coverage_clean.lcov && bash <(curl -s https://codecov.io/bash) -X gcov -C ${CIRCLE_SHA1} -f coverage_clean.lcov -R ../..
    - cd docker && make dcmqi
    # Install package required by convert.py
    - pip install lxml==3.6.4
    - |
      cd docker && make dcmqi.test && \
      python ../util/junit/convert.py \
        ../build/dcmqi-build/ \
        ../util/junit/conv.xsl > ../build/BaseTest.xml
    # Install package required to automatically create or update GitHub releases
    - pip install scikit-ci-addons==0.14.0

test:
  post:
    - mkdir -p ${CIRCLE_TEST_REPORTS}/junit
    - cp ~/dcmqi/build/BaseTest.xml ${CIRCLE_TEST_REPORTS}/junit

{'fraction_non_alphanumeric': 0.17140661029976942, 'fraction_numerical': 0.036382270048680505, 'mean_word_length': 2.6485981308411213, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '699772', 'n_tokens_mistral': 1622, 'n_tokens_neox': 1501, 'n_words': 305}