Skip to content

Commit 8cc58e6

Browse files
authored
Merge branch 'stdlib-js:develop' into jkl
2 parents e4f1d66 + ef90f52 commit 8cc58e6

File tree

526 files changed

+9436
-3463
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

526 files changed

+9436
-3463
lines changed

.github/workflows/autoclose.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,3 +221,30 @@ jobs:
221221
We recommend opening a new pull request with only the intended changes.
222222
223223
Thank you for your interest in stdlib, and we look forward to your future contributions.
224+
225+
# Define a job which closes a pull request if proposed changes duplicate already included changes:
226+
already_resolved:
227+
228+
# Define job name:
229+
name: 'Check for already resolved label'
230+
231+
# Only run this job if the pull request has a specific label:
232+
if: "${{ github.event.label.name == 'autoclose: Already Resolved' }}"
233+
234+
# Define the type of virtual host machine:
235+
runs-on: ubuntu-latest
236+
237+
# Define the sequence of job steps:
238+
steps:
239+
240+
# Close the pull request:
241+
- name: 'Close pull request'
242+
run: gh pr close "$NUMBER" --comment "$BODY"
243+
env:
244+
GH_TOKEN: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }}
245+
GH_REPO: ${{ github.repository }}
246+
NUMBER: ${{ github.event.pull_request.number }}
247+
BODY: |
248+
Thank you for working on this pull request. However, we cannot accept your contribution as the issue this pull request seeks to resolve has already been addressed in a different pull request or commit.
249+
250+
Thank you again for your interest in stdlib, and we look forward to reviewing your future contributions.

CONTRIBUTORS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# Contributors listed in alphabetical order.
44

55
Aadish Jain <[email protected]>
6+
Aarya Balwadkar <[email protected]>
67
Aayush Khanna <[email protected]>
78
Abdelrahman Samir <[email protected]>
89
Abdul Kaium <[email protected]>
@@ -77,6 +78,7 @@ Justyn Shelby <[email protected]>
7778
Karan Anand <[email protected]>
7879
Karthik Prakash <[email protected]>
7980
Kaushikgtm <[email protected]>
81+
Kavyansh-Bagdi <[email protected]>
8082
Kohantika Nath <[email protected]>
8183
Krishnam Agarwal <[email protected]>
8284
Krishnendu Das <[email protected]>
@@ -104,6 +106,7 @@ Ognjen Jevremović <[email protected]>
104106
Oneday12323 <[email protected]>
105107
Ori Miles <[email protected]>
106108
Philipp Burckhardt <[email protected]>
109+
Prajjwal Bajpai <[email protected]>
107110
Prajwal Kulkarni <[email protected]>
108111
Pranav Goswami <[email protected]>
109112
Pranjal Jha <[email protected]>

docs/contributing/FAQ.md

Lines changed: 33 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ limitations under the License.
2727
- [How can I set up my development environment to contribute to stdlib?](#setup-dev-environment)
2828
- [How can I install cppcheck?](#install-cppcheck)
2929
- [I am seeing different return values in the JavaScript and C implementation for the same implementation.](#js-vs-c-return-values)
30-
- [What should I do if Markdown linting on my commits fails because my headings exceed the maximum permissible length?](#markdown-heading-length)
30+
- [What should I do if linting on my commits fails because my headings or lines exceed the maximum permissible length?](#markdown-heading-length)
31+
- [What should I do if JavaScript linting on my commits fails because my function exceeds the maximum permissible number of parameters?](#max-params)
3132
- [I have opened a pull request, where can I seek feedback?](#pr-feedback)
3233
- [I need to generate fixtures for my tests. How can I do that, and what are the best references for inspiration?](#generate-fixtures)
3334
- [I am facing a `Shadowed declaration` linting error in my C files, how can I fix it?](#shadowed-declaration)
@@ -64,8 +65,6 @@ There are primarily two options for setting up your development environment to c
6465

6566
Note: The dev container does not yet support ARM64 architectures. For more information, or if you're interested in adding ARM64 support, you can visit this [issue][devcontainer-issue].
6667

67-
TODO: Modify the dev container setup link to the exact file link once it is merged.
68-
6968
<a name="install-cppcheck"></a>
7069

7170
## How can I install cppcheck?
@@ -101,15 +100,37 @@ If they pass, adjust the tolerance and add a note to the C tests indicating that
101100

102101
<a name="markdown-heading-length"></a>
103102

104-
## What should I do if Markdown linting on my commits fails because my headings exceed the maximum permissible length?
103+
## What should I do if linting on my commits fails because my headings or lines exceed the maximum permissible length?
104+
105+
Consider whether the heading/line can be shortened by renaming variables (e.g., changing `strideX` to `sx`). If shortening is not possible, disable the lint rule at the top level using:
106+
107+
- For JavaScript files:
105108

106-
Consider whether the heading can be shortened by renaming variables (e.g., changing `strideX` to `sx`). If shortening is not possible, disable the lint rule at the top level using:
109+
```javascript
110+
// eslint-disable-line max-len
111+
```
112+
113+
[Reference Comment][javascript-len-ref]
114+
115+
- For Markdown files:
107116

108117
```markdown
109118
<!-- lint disable maximum-heading-length -->
110119
```
111120

112-
TODO: Can we add a reference PR link?
121+
[Reference Comment][markdown-len-ref]
122+
123+
<a name="markdown-heading-length"></a>
124+
125+
## What should I do if JavaScript linting on my commits fails because my function exceeds the maximum permissible number of parameters?
126+
127+
Consider whether the number of parameters can be reduced. If reduction is not possible, disable the lint rule at the top level using:
128+
129+
```javascript
130+
// eslint-disable-line max-params
131+
```
132+
133+
[Reference Comment][javascript-params-ref]
113134

114135
<a name="pr-feedback"></a>
115136

@@ -386,6 +407,12 @@ For more `make` commands, refer to the [documentation][benchmark] on running ben
386407

387408
[make-commands]: https://github.com/stdlib-js/stdlib/tree/develop/tools/make/lib
388409

410+
[markdown-len-ref]: https://github.com/stdlib-js/stdlib/blob/78e0cfd8b6c0429a443b07fd39fa9dd53bf44d23/lib/node_modules/%40stdlib/lapack/base/dgttrf/README.md?plain=1#L94
411+
412+
[javascript-len-ref]: https://github.com/stdlib-js/stdlib/blob/78e0cfd8b6c0429a443b07fd39fa9dd53bf44d23/lib/node_modules/%40stdlib/lapack/base/dgttrf/lib/base.js#L111
413+
414+
[javascript-params-ref]: https://github.com/stdlib-js/stdlib/blob/78e0cfd8b6c0429a443b07fd39fa9dd53bf44d23/lib/node_modules/%40stdlib/lapack/base/dgttrf/lib/base.js#L75
415+
389416
</section>
390417

391418
<!-- /.links -->

lib/node_modules/@stdlib/console/docs/types/index.d.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,20 @@ interface Namespace {
5959
*
6060
* ns.logEach( '%d < %d ', x, y );
6161
* // e.g., => '1 < 4\n2 < 5\n3 < 6\n'
62+
*
63+
* @example
64+
* var x = [ 0.5, 1.0, 1.5 ];
65+
* var y = [ 0.25, 0.5, 0.75 ];
66+
*
67+
* ns.logEach( '%0.2f > %0.2f', x, y );
68+
* // e.g., => '0.50 > 0.25\n1.00 > 0.50\n1.50 > 0.75\n'
69+
*
70+
* @example
71+
* var x = [ 'foo', 'bar' ];
72+
* var y = [ 'beep', 'boop' ];
73+
*
74+
* ns.logEach( 'x: %s, y: %s', x, y );
75+
* // e.g., => 'x: foo, y: beep\nx: bar, y: boop\n'
6276
*/
6377
logEach: typeof logEach;
6478

lib/node_modules/@stdlib/console/log-each-map/README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ limitations under the License.
2020

2121
# logEachMap
2222

23-
> Insert array element values and the result of a callback function into a format string and print the result.
23+
> Insert array element values and the result of a callback function into a [format string][@stdlib/string/format] and print the result.
2424
2525
<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->
2626

@@ -42,7 +42,7 @@ var logEachMap = require( '@stdlib/console/log-each-map' );
4242

4343
#### logEachMap( str\[, ...args], clbk\[, thisArg] )
4444

45-
Inserts array element values and the result of a callback function into a format string and prints the result.
45+
Inserts array element values and the result of a callback function into a [format string][@stdlib/string/format] and prints the result.
4646

4747
```javascript
4848
function add( a, b ) {
@@ -95,10 +95,10 @@ function multiply( x, y ) {
9595
}
9696

9797
var x = [ 1, 2, 3 ];
98-
var y = 2;
98+
var y = 0.5;
9999

100-
logEachMap( '%d * %d = %d', x, y, multiply );
101-
// e.g., => '1 * 2 = 2\n2 * 2 = 4\n3 * 2 = 6\n'
100+
logEachMap( '%0.1f * %0.1f = %0.1f', x, y, multiply );
101+
// e.g., => '1.0 * 0.5 = 0.5\n2.0 * 0.5 = 1.0\n3.0 * 0.5 = 1.5\n'
102102
```
103103

104104
The callback function is provided the following arguments:
@@ -182,6 +182,8 @@ logEachMap( '%d + %d = %d', x, y, add );
182182

183183
[@stdlib/array/complex64]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/complex64
184184

185+
[@stdlib/string/format]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/string/format
186+
185187
</section>
186188

187189
<!-- /.links -->

lib/node_modules/@stdlib/console/log-each-map/docs/repl.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,15 @@
2727
> function f( x, y ) { return x + y; };
2828
> {{alias}}( '%d + %d = %d', x, y, f );
2929

30+
> var x = [ 0.5, 1.0, 1.5 ];
31+
> var y = [ 0.5, 0.75, 1.0 ];
32+
> function f( x, y ) { return x * y; };
33+
> {{alias}}( '%0.2f * %0.2f = %0.2f', x, y, f );
34+
35+
> var x = [ 'foo', 'bar' ];
36+
> var y = [ 'baz', 'beep' ];
37+
> function f( x, y ) { return x + y; };
38+
> {{alias}}( '%s+%s = %s', x, y, f );
39+
3040
See Also
3141
--------

lib/node_modules/@stdlib/console/log-each-map/lib/index.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,26 @@
3535
*
3636
* logEachMap( '%d + %d = %d', x, y, add );
3737
* // e.g., => '1 + 4 = 5\n2 + 5 = 7\n3 + 6 = 9\n'
38+
*
39+
* function multiply( x, y ) {
40+
* return x * y;
41+
* }
42+
*
43+
* var x = [ 0.5, 1.0, 1.5 ];
44+
* var y = [ 0.5, 0.75, 1.0 ];
45+
*
46+
* logEachMap( '%0.2f * %0.2f = %0.2f', x, y, multiply );
47+
* // e.g., => '0.50 * 0.50 = 0.25\n1.00 * 0.75 = 0.75\n1.50 * 1.00 = 1.50\n'
48+
*
49+
* function append( x, y ) {
50+
* return x + y;
51+
* }
52+
*
53+
* var x = [ 'foo', 'bar' ];
54+
* var y = [ 'baz', 'beep' ];
55+
*
56+
* logEachMap( '%s+%s = %s', x, y, append );
57+
* // e.g., => 'foo+baz = foobaz\nbar+beep = barbeep\n'
3858
*/
3959

4060
// MODULES //

lib/node_modules/@stdlib/console/log-each-map/lib/main.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,28 @@ var logger = require( '@stdlib/console/log' );
5454
*
5555
* logEachMap( '%d + %d = %d', x, y, add );
5656
* // e.g., => '1 + 4 = 5\n2 + 5 = 7\n3 + 6 = 9\n'
57+
*
58+
* @example
59+
* function multiply( x, y ) {
60+
* return x * y;
61+
* }
62+
*
63+
* var x = [ 0.5, 1.0, 1.5 ];
64+
* var y = [ 0.5, 0.75, 1.0 ];
65+
*
66+
* logEachMap( '%0.2f * %0.2f = %0.2f', x, y, multiply );
67+
* // e.g., => '0.50 * 0.50 = 0.25\n1.00 * 0.75 = 0.75\n1.50 * 1.00 = 1.50\n'
68+
*
69+
* @example
70+
* function append( x, y ) {
71+
* return x + y;
72+
* }
73+
*
74+
* var x = [ 'foo', 'bar' ];
75+
* var y = [ 'baz', 'beep' ];
76+
*
77+
* logEachMap( '%s+%s = %s', x, y, append );
78+
* // e.g., => 'foo+baz = foobaz\nbar+beep = barbeep\n'
5779
*/
5880
function logEachMap( str ) {
5981
var strides;

lib/node_modules/@stdlib/console/log-each/README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ limitations under the License.
2020

2121
# logEach
2222

23-
> Insert array element values into a format string and print the result.
23+
> Insert array element values into a [format string][@stdlib/string/format] and print the result.
2424
2525
<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->
2626

@@ -42,7 +42,7 @@ var logEach = require( '@stdlib/console/log-each' );
4242

4343
#### logEach( str\[, ...args] )
4444

45-
Inserts array element values into a format string and prints the result.
45+
Inserts array element values into a [format string][@stdlib/string/format] and prints the result.
4646

4747
```javascript
4848
var x = [ 1, 2, 3 ];
@@ -56,10 +56,10 @@ If an interpolated argument is not an array-like object, the argument is broadca
5656

5757
```javascript
5858
var x = [ 1, 2, 3 ];
59-
var y = 4;
59+
var y = 0.5;
6060

61-
logEach( '%d < %d', x, y );
62-
// e.g., => '1 < 4\n2 < 4\n3 < 4\n'
61+
logEach( '%0.1f > %0.1f', x, y );
62+
// e.g., => '1.0 > 0.5\n2.0 > 0.5\n3.0 > 0.5\n'
6363
```
6464

6565
</section>
@@ -130,6 +130,8 @@ logEach( 'abs(%d) = %d', x, y );
130130

131131
[@stdlib/array/complex64]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/complex64
132132

133+
[@stdlib/string/format]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/string/format
134+
133135
</section>
134136

135137
<!-- /.links -->

lib/node_modules/@stdlib/console/log-each/docs/repl.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,14 @@
1919
> var y = [ 4, 5, 6 ];
2020
> {{alias}}( '%d < %d ', x, y );
2121

22+
> var x = [ 0.5, 1.0, 1.5 ];
23+
> var y = [ 0.25, 0.5, 0.75 ];
24+
> {{alias}}( '%0.2f > %0.2f', x, y );
25+
26+
> var x = [ 'foo', 'bar' ];
27+
> var y = [ 'beep', 'boop' ];
28+
> {{alias}}( 'x: %s, y: %s', x, y );
29+
2230
See Also
2331
--------
2432

0 commit comments

Comments
 (0)