Skip to content

Commit 17d1068

Browse files
committed
Merge branch 'common'
2 parents eaf9f97 + 591ac0a commit 17d1068

File tree

5 files changed

+16
-8
lines changed

5 files changed

+16
-8
lines changed

.circleci/config.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ jobs:
55
build:
66
docker:
77
- image: "debian:stretch"
8-
steps:
8+
steps:
99
- run:
1010
name: Installing SUDO
1111
command: 'apt update && apt install -y sudo && rm -rf /var/lib/apt/lists/*'
@@ -21,15 +21,21 @@ jobs:
2121
- run:
2222
name: Installing CURL
2323
command: 'apt install -y curl'
24+
- run:
25+
name: Installing GIT
26+
command: 'apt install -y git'
2427
- checkout
28+
- run:
29+
name: Pull Submodules
30+
command: git submodule update --init --recursive
2531
- run:
2632
name: Build & Test
2733
command: |
2834
make clean
2935
make unit_tests
3036
cd build
31-
make test
37+
make test ARGS="-V"
3238
make coverage
33-
bash <(curl -s https://codecov.io/bash) -f cmake_coverage.output
39+
bash <(curl -s https://codecov.io/bash) -f coverage.info -X gcov -x gcov-7 || echo "Codecov did not collect coverage reports"
3440
3541

CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,7 @@ add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/src")
5757

5858
# --- Unit Tests ---
5959
ENABLE_TESTING()
60-
# Make the output more verbose
61-
# add_custom_target(test COMMAND ${CMAKE_CTEST_COMMAND} --verbose)
60+
6261
if(BUILD_TESTS)
6362
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/tests")
6463
endif(BUILD_TESTS)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
![License](https://img.shields.io/badge/License-MIT-blue.svg)
3-
3+
[![codecov](https://codecov.io/gh/filipecosta90/tdigest/branch/master/graph/badge.svg)](https://codecov.io/gh/filipecosta90/tdigest)
44
# T-Digest
55

66
Adaptive histogram based on something like streaming k-means crossed with Q-digest.

cmake/UseCodeCoverage.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ if(ENABLE_CODECOVERAGE)
1313
endif ( NOT CMAKE_BUILD_TYPE STREQUAL "Debug" )
1414

1515
if ( NOT DEFINED CODECOV_OUTPUTFILE )
16-
set( CODECOV_OUTPUTFILE cmake_coverage.output )
16+
set( CODECOV_OUTPUTFILE coverage.info )
1717
endif ( NOT DEFINED CODECOV_OUTPUTFILE )
1818

1919
if ( NOT DEFINED CODECOV_HTMLOUTPUTDIR )

tests/td_test.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,13 @@ MU_TEST(test_nans)
185185
mu_assert(isnan(td_quantile(t, 0)), "empty value at 0");
186186
mu_assert(isnan(td_quantile(t, 0.5)), "empty value at .5");
187187
mu_assert(isnan(td_quantile(t, 1)), "empty value at 1");
188+
mu_assert(isnan(td_centroids_weight_at(t,1)), "td_centroids_weight_at on pos > h->merged_nodes");
189+
mu_assert(isnan(td_centroids_weight_at(t,-1)), "td_centroids_weight_at on pos < 0");
190+
mu_assert(isnan(td_centroids_mean_at(t,1)), "td_centroids_mean_at on pos > h->merged_nodes");
191+
mu_assert(isnan(td_centroids_mean_at(t,-1)), "td_centroids_mean_at on pos < 0");
188192
td_add(t, 1, 1);
189193
mu_assert(isnan(td_quantile(t, -.1)), "value at -0.1");
190194
mu_assert(isnan(td_quantile(t, 1.1)), "value at 1.1");
191-
192195
td_free(t);
193196
}
194197

0 commit comments

Comments
 (0)