Skip to content

Commit c93a563

Browse files
committed
Auto-generated commit
1 parent 6192c88 commit c93a563

File tree

6 files changed

+19
-94
lines changed

6 files changed

+19
-94
lines changed

.github/.keepalive

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2023-11-01T02:15:27.685Z

.github/workflows/publish.yml

+10-2
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,11 @@ jobs:
182182
fi
183183
# Trim leading and trailing whitespace:
184184
dep=$(echo "$dep" | xargs)
185-
version="^$(npm view $dep version)"
185+
version="$(npm view $dep version)"
186+
if [[ -z "$version" ]]; then
187+
continue
188+
fi
189+
version="^$version"
186190
jq -r --arg dep "$dep" --arg version "$version" '.dependencies[$dep] = $version' package.json > package.json.tmp
187191
mv package.json.tmp package.json
188192
done
@@ -192,7 +196,11 @@ jobs:
192196
fi
193197
# Trim leading and trailing whitespace:
194198
dep=$(echo "$dep" | xargs)
195-
version="^$(npm view $dep version)"
199+
version="$(npm view $dep version)"
200+
if [[ -z "$version" ]]; then
201+
continue
202+
fi
203+
version="^$version"
196204
jq -r --arg dep "$dep" --arg version "$version" '.devDependencies[$dep] = $version' package.json > package.json.tmp
197205
mv package.json.tmp package.json
198206
done

CONTRIBUTORS

+1
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,4 @@ Stephannie Jiménez Gacha <[email protected]>
3737
Yernar Yergaziyev <[email protected]>
3838
orimiles5 <[email protected]>
3939
40+
Robert Gislason <[email protected]>

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,8 @@ Copyright &copy; 2016-2023. The Stdlib [Authors][stdlib-authors].
210210
[npm-image]: http://img.shields.io/npm/v/@stdlib/stats-incr-rmse.svg
211211
[npm-url]: https://npmjs.org/package/@stdlib/stats-incr-rmse
212212

213-
[test-image]: https://github.com/stdlib-js/stats-incr-rmse/actions/workflows/test.yml/badge.svg?branch=v0.1.1
214-
[test-url]: https://github.com/stdlib-js/stats-incr-rmse/actions/workflows/test.yml?query=branch:v0.1.1
213+
[test-image]: https://github.com/stdlib-js/stats-incr-rmse/actions/workflows/test.yml/badge.svg?branch=main
214+
[test-url]: https://github.com/stdlib-js/stats-incr-rmse/actions/workflows/test.yml?query=branch:main
215215

216216
[coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/stats-incr-rmse/main.svg
217217
[coverage-url]: https://codecov.io/github/stdlib-js/stats-incr-rmse?branch=main

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"devDependencies": {
4545
"@stdlib/bench": "^0.1.0",
4646
"@stdlib/constants-float64-eps": "^0.1.1",
47-
"@stdlib/math-base-special-abs": "^0.1.0",
47+
"@stdlib/math-base-special-abs": "^0.1.1",
4848
"@stdlib/random-base-randu": "^0.1.0",
4949
"tape": "git+https://github.com/kgryte/tape.git#fix/globby",
5050
"istanbul": "^0.4.1",

test/dist/test.js

+4-89
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @license Apache-2.0
33
*
4-
* Copyright (c) 2018 The Stdlib Authors.
4+
* Copyright (c) 2023 The Stdlib Authors.
55
*
66
* Licensed under the Apache License, Version 2.0 (the "License");
77
* you may not use this file except in compliance with the License.
@@ -21,98 +21,13 @@
2121
// MODULES //
2222

2323
var tape = require( 'tape' );
24-
var abs = require( '@stdlib/math-base-special-abs' );
25-
var sqrt = require( '@stdlib/math-base-special-sqrt' );
26-
var EPS = require( '@stdlib/constants-float64-eps' );
27-
var incrrmse = require( './../../dist' );
24+
var main = require( './../../dist' );
2825

2926

3027
// TESTS //
3128

32-
tape( 'main export is a function', function test( t ) {
29+
tape( 'main export is defined', function test( t ) {
3330
t.ok( true, __filename );
34-
t.strictEqual( typeof incrrmse, 'function', 'main export is a function' );
35-
t.end();
36-
});
37-
38-
tape( 'the function returns an accumulator function', function test( t ) {
39-
t.equal( typeof incrrmse(), 'function', 'returns a function' );
40-
t.end();
41-
});
42-
43-
tape( 'the initial accumulated value is `null`', function test( t ) {
44-
var acc = incrrmse();
45-
t.equal( acc(), null, 'returns expected value' );
46-
t.end();
47-
});
48-
49-
tape( 'the accumulator function incrementally computes the root mean squared error', function test( t ) {
50-
var expected;
51-
var actual;
52-
var delta;
53-
var data;
54-
var acc;
55-
var sum;
56-
var tol;
57-
var N;
58-
var r;
59-
var x;
60-
var y;
61-
var i;
62-
63-
data = [
64-
[ 2.0, 3.0 ],
65-
[ 3.0, -1.0 ],
66-
[ 2.0, 5.0 ],
67-
[ 4.0, -4.0 ],
68-
[ 3.0, 0.0 ],
69-
[ -4.0, 5.0 ]
70-
];
71-
N = data.length;
72-
73-
acc = incrrmse();
74-
75-
sum = 0;
76-
for ( i = 0; i < N; i++ ) {
77-
x = data[ i ][ 0 ];
78-
y = data[ i ][ 1 ];
79-
r = y - x;
80-
sum += r * r;
81-
expected = sqrt( sum/(i+1) );
82-
actual = acc( x, y );
83-
if ( actual === expected ) {
84-
t.equal( actual, expected, 'returns expected value' );
85-
} else {
86-
delta = abs( expected - actual );
87-
tol = 1.0 * EPS * abs( expected );
88-
t.equal( delta <= tol, true, 'within tolerance. Actual: '+actual+'. Expected: '+expected+'. Delta: '+delta+'. Tol: '+tol+'.' );
89-
}
90-
}
91-
t.end();
92-
});
93-
94-
tape( 'if not provided an input value, the accumulator function returns the current root mean squared error', function test( t ) {
95-
var expected;
96-
var actual;
97-
var delta;
98-
var data;
99-
var acc;
100-
var tol;
101-
var i;
102-
103-
data = [
104-
[ 2.0, 3.0 ],
105-
[ 3.0, -5.0 ],
106-
[ 1.0, 10.0 ]
107-
];
108-
acc = incrrmse();
109-
for ( i = 0; i < data.length; i++ ) {
110-
acc( data[ i ][ 0 ], data[ i ][ 1 ] );
111-
}
112-
actual = acc();
113-
expected = sqrt( ( 1.0+64.0+81.0 ) / 3.0 );
114-
delta = abs( expected - actual );
115-
tol = 1.0 * EPS * abs( expected );
116-
t.equal( delta <= tol, true, 'within tolerance. Actual: '+actual+'. Expected: '+expected+'. Delta: '+delta+'. Tol: '+tol+'.' );
31+
t.strictEqual( main !== void 0, true, 'main export is defined' );
11732
t.end();
11833
});

0 commit comments

Comments
 (0)