Skip to content

Commit

Permalink
Auto-generated commit
Browse files Browse the repository at this point in the history
  • Loading branch information
stdlib-bot committed Nov 1, 2023
1 parent 883b37d commit d385374
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 198 deletions.
1 change: 1 addition & 0 deletions .github/.keepalive
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2023-11-01T05:57:39.539Z
12 changes: 10 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,11 @@ jobs:
fi
# Trim leading and trailing whitespace:
dep=$(echo "$dep" | xargs)
version="^$(npm view $dep version)"
version="$(npm view $dep version)"
if [[ -z "$version" ]]; then
continue
fi
version="^$version"
jq -r --arg dep "$dep" --arg version "$version" '.dependencies[$dep] = $version' package.json > package.json.tmp
mv package.json.tmp package.json
done
Expand All @@ -192,7 +196,11 @@ jobs:
fi
# Trim leading and trailing whitespace:
dep=$(echo "$dep" | xargs)
version="^$(npm view $dep version)"
version="$(npm view $dep version)"
if [[ -z "$version" ]]; then
continue
fi
version="^$version"
jq -r --arg dep "$dep" --arg version "$version" '.devDependencies[$dep] = $version' package.json > package.json.tmp
mv package.json.tmp package.json
done
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ Stephannie Jiménez Gacha <[email protected]>
Yernar Yergaziyev <[email protected]>
orimiles5 <[email protected]>
rei2hu <[email protected]>
Robert Gislason <[email protected]>
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@
},
"dependencies": {
"@stdlib/array-base-assert-contains": "^0.1.0",
"@stdlib/assert-is-complex-like": "^0.1.0",
"@stdlib/assert-is-complex-like": "^0.1.1",
"@stdlib/assert-is-function": "^0.1.1",
"@stdlib/assert-is-integer": "^0.1.0",
"@stdlib/assert-is-ndarray-like": "^0.1.0",
"@stdlib/assert-is-number": "^0.1.1",
"@stdlib/assert-is-range-error": "^0.1.1",
"@stdlib/assert-is-syntax-error": "^0.1.1",
"@stdlib/assert-is-type-error": "^0.1.1",
"@stdlib/complex-dtype": "^0.1.0",
"@stdlib/complex-dtype": "^0.1.1",
"@stdlib/constants-int16-max": "^0.1.1",
"@stdlib/constants-int32-max": "^0.1.1",
"@stdlib/constants-int8-max": "^0.1.1",
Expand All @@ -55,14 +55,14 @@
"@stdlib/ndarray-base-assert-is-safe-data-type-cast": "^0.1.0",
"@stdlib/ndarray-base-assert-is-signed-integer-data-type": "^0.1.0",
"@stdlib/ndarray-base-assert-is-unsigned-integer-data-type": "^0.1.0",
"@stdlib/ndarray-base-slice": "github:stdlib-js/ndarray-base-slice#main",
"@stdlib/ndarray-base-slice-assign": "github:stdlib-js/ndarray-base-slice-assign#main",
"@stdlib/ndarray-base-slice": "^0.1.0",
"@stdlib/ndarray-base-slice-assign": "^0.1.0",
"@stdlib/ndarray-ctor": "^0.1.0",
"@stdlib/ndarray-defaults": "^0.1.1",
"@stdlib/ndarray-from-scalar": "^0.1.0",
"@stdlib/ndarray-min-dtype": "^0.1.0",
"@stdlib/ndarray-min-dtype": "^0.1.1",
"@stdlib/proxy-ctor": "^0.1.1",
"@stdlib/slice-base-sargs2multislice": "github:stdlib-js/slice-base-sargs2multislice#main",
"@stdlib/slice-base-sargs2multislice": "^0.2.0",
"@stdlib/slice-base-seq2multislice": "^0.1.0",
"@stdlib/slice-base-str2multislice": "^0.1.0",
"@stdlib/slice-base-str2slice": "^0.1.0",
Expand All @@ -78,7 +78,7 @@
"devDependencies": {
"@stdlib/array-complex128": "^0.1.0",
"@stdlib/array-complex64": "^0.1.0",
"@stdlib/array-float64": "^0.1.0",
"@stdlib/array-float64": "^0.1.1",
"@stdlib/assert-has-own-property": "^0.1.1",
"@stdlib/assert-has-property": "^0.1.1",
"@stdlib/assert-has-proxy-support": "^0.1.1",
Expand All @@ -87,10 +87,10 @@
"@stdlib/assert-is-plain-object": "^0.1.1",
"@stdlib/assert-is-positive-integer": "^0.1.0",
"@stdlib/bench": "^0.1.0",
"@stdlib/complex-float32": "^0.1.0",
"@stdlib/complex-float64": "^0.1.0",
"@stdlib/complex-imagf": "^0.1.0",
"@stdlib/complex-realf": "^0.1.0",
"@stdlib/complex-float32": "^0.1.1",
"@stdlib/complex-float64": "^0.1.1",
"@stdlib/complex-imagf": "^0.1.1",
"@stdlib/complex-realf": "^0.1.1",
"@stdlib/ndarray-to-array": "^0.1.0",
"@stdlib/ndarray-zeros": "^0.1.0",
"@stdlib/slice-ctor": "^0.1.0",
Expand Down
188 changes: 3 additions & 185 deletions test/dist/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,195 +21,13 @@
// MODULES //

var tape = require( 'tape' );
var instanceOf = require( '@stdlib/assert-instance-of' );
var Complex64Array = require( '@stdlib/array-complex64' );
var FancyArray = require( './../../dist' );
var main = require( './../../dist' );


// TESTS //

tape( 'main export is a function', function test( t ) {
tape( 'main export is defined', function test( t ) {
t.ok( true, __filename );
t.strictEqual( typeof FancyArray, 'function', 'main export is a function' );
t.end();
});

tape( 'the function is a constructor', function test( t ) {
var strides;
var buffer;
var offset;
var dtype;
var order;
var shape;
var arr;

dtype = 'generic';
buffer = [ 1.0, 2.0, 3.0, 4.0 ];
shape = [ 2, 2 ];
order = 'row-major';
strides = [ 2, 1 ];
offset = 0;

arr = new FancyArray( dtype, buffer, shape, strides, offset, order );

t.strictEqual( instanceOf( arr, FancyArray ), true, 'returns an instance' );
t.end();
});

tape( 'the function is a constructor (complex dtype)', function test( t ) {
var strides;
var buffer;
var offset;
var dtype;
var order;
var shape;
var arr;

dtype = 'complex64';
buffer = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
shape = [ 2, 2 ];
order = 'row-major';
strides = [ 2, 1 ];
offset = 0;

arr = new FancyArray( dtype, buffer, shape, strides, offset, order );

t.strictEqual( instanceOf( arr, FancyArray ), true, 'returns an instance' );
t.end();
});

tape( 'the function is a constructor (0d)', function test( t ) {
var strides;
var buffer;
var offset;
var dtype;
var order;
var shape;
var arr;

dtype = 'generic';
buffer = [ 1.0 ];
shape = [];
order = 'row-major';
strides = [ 0 ];
offset = 0;

arr = new FancyArray( dtype, buffer, shape, strides, offset, order );

t.strictEqual( instanceOf( arr, FancyArray ), true, 'returns an instance' );
t.end();
});

tape( 'the function is a constructor (0d; complex dtype)', function test( t ) {
var strides;
var buffer;
var offset;
var dtype;
var order;
var shape;
var arr;

dtype = 'complex64';
buffer = new Complex64Array( [ 1.0, 1.0 ] );
shape = [];
order = 'row-major';
strides = [ 0 ];
offset = 0;

arr = new FancyArray( dtype, buffer, shape, strides, offset, order );

t.strictEqual( instanceOf( arr, FancyArray ), true, 'returns an instance' );
t.end();
});

tape( 'the function is a constructor (options)', function test( t ) {
var strides;
var buffer;
var offset;
var dtype;
var order;
var shape;
var arr;

dtype = 'generic';
buffer = [ 1.0, 2.0, 3.0, 4.0 ];
shape = [ 2, 2 ];
order = 'row-major';
strides = [ 2, 1 ];
offset = 0;

arr = new FancyArray( dtype, buffer, shape, strides, offset, order, {} );

t.strictEqual( instanceOf( arr, FancyArray ), true, 'returns an instance' );
t.end();
});

tape( 'the function is a constructor (0d; options)', function test( t ) {
var strides;
var buffer;
var offset;
var dtype;
var order;
var shape;
var arr;

dtype = 'generic';
buffer = [ 1.0 ];
shape = [];
order = 'row-major';
strides = [ 0 ];
offset = 0;

arr = new FancyArray( dtype, buffer, shape, strides, offset, order, {} );

t.strictEqual( instanceOf( arr, FancyArray ), true, 'returns an instance' );
t.end();
});

tape( 'the constructor does not require the `new` keyword', function test( t ) {
var ndarray;
var strides;
var buffer;
var offset;
var dtype;
var order;
var shape;
var arr;

dtype = 'generic';
buffer = [ 1.0, 2.0, 3.0, 4.0 ];
shape = [ 2, 2 ];
order = 'row-major';
strides = [ 2, 1 ];
offset = 0;

ndarray = FancyArray;
arr = ndarray( dtype, buffer, shape, strides, offset, order );

t.strictEqual( instanceOf( arr, FancyArray ), true, 'returns an instance' );
t.end();
});

tape( 'the constructor does not require the `new` keyword (options)', function test( t ) {
var ndarray;
var strides;
var buffer;
var offset;
var dtype;
var order;
var shape;
var arr;

dtype = 'generic';
buffer = [ 1.0, 2.0, 3.0, 4.0 ];
shape = [ 2, 2 ];
order = 'row-major';
strides = [ 2, 1 ];
offset = 0;

ndarray = FancyArray;
arr = ndarray( dtype, buffer, shape, strides, offset, order, {} );

t.strictEqual( instanceOf( arr, FancyArray ), true, 'returns an instance' );
t.strictEqual( main !== void 0, true, 'main export is defined' );
t.end();
});

0 comments on commit d385374

Please sign in to comment.