Skip to content

Commit 4a74634

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into refactor-dmax
2 parents 6d920c1 + 435b951 commit 4a74634

File tree

129 files changed

+6082
-154
lines changed

Some content is hidden

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

129 files changed

+6082
-154
lines changed
Lines changed: 242 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,242 @@
1+
#/
2+
# @license Apache-2.0
3+
#
4+
# Copyright (c) 2024 The Stdlib Authors.
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#/
18+
19+
# Workflow name:
20+
name: label_commands
21+
22+
# Workflow triggers:
23+
on:
24+
pull_request:
25+
types:
26+
- labeled
27+
28+
# Workflow jobs:
29+
jobs:
30+
31+
# Define a job for removing the label and adding in-progress label:
32+
manage_labels:
33+
34+
# Define a display name:
35+
name: 'Manage labels'
36+
37+
# Define the type of virtual host machine:
38+
runs-on: ubuntu-latest
39+
40+
# Define the conditions under which the job should run:
41+
if: |
42+
github.event.label.name == 'bot: Merge' ||
43+
github.event.label.name == 'bot: Rebase' ||
44+
github.event.label.name == 'bot: Check Files' ||
45+
github.event.label.name == 'bot: Lint Autofix' ||
46+
github.event.label.name == 'bot: Update Copyright Years'
47+
48+
# Define the job's steps:
49+
steps:
50+
51+
- name: 'Remove label'
52+
# Pin action to full length commit SHA
53+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
54+
with:
55+
github-token: ${{ secrets.STDLIB_BOT_GITHUB_TOKEN }}
56+
script: |
57+
try {
58+
await github.rest.issues.removeLabel({
59+
'owner': context.repo.owner,
60+
'repo': context.repo.repo,
61+
'issue_number': context.issue.number,
62+
'name': '${{ github.event.label.name }}'
63+
})
64+
} catch ( error ) {
65+
console.log( 'Error removing label: %s', error.message );
66+
}
67+
68+
- name: 'Add in-progress label'
69+
# Pin action to full length commit SHA
70+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
71+
with:
72+
github-token: ${{ secrets.STDLIB_BOT_GITHUB_TOKEN }}
73+
script: |
74+
github.rest.issues.addLabels({
75+
'owner': context.repo.owner,
76+
'repo': context.repo.repo,
77+
'issue_number': context.issue.number,
78+
'labels': ['bot: In Progress']
79+
})
80+
81+
# Add initial reaction to comment with slash command:
82+
- name: 'Add initial reaction'
83+
run: |
84+
curl -X POST \
85+
-H "Accept: application/vnd.github.v3+json" \
86+
-H "Authorization: Bearer ${{ secrets.STDLIB_BOT_GITHUB_TOKEN }}" \
87+
"https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/reactions" \
88+
-d '{"content":"eyes"}'
89+
90+
# Define a job for checking for required files:
91+
check_files:
92+
93+
# Define a display name:
94+
name: 'Check for required files'
95+
96+
# Ensure initial reaction job has completed before running this job:
97+
needs: [ manage_labels ]
98+
99+
# Define the conditions under which the job should run:
100+
if: |
101+
github.event.label.name == 'bot: Check Files'
102+
103+
# Run reusable workflow:
104+
uses: ./.github/workflows/check_required_files.yml
105+
with:
106+
pull_request_number: ${{ github.event.pull_request.number }}
107+
user: ${{ github.event.sender.login }}
108+
secrets:
109+
STDLIB_BOT_GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_GITHUB_TOKEN }}
110+
111+
# Define a job for updating copyright header years:
112+
update_copyright_years:
113+
114+
# Define a display name:
115+
name: 'Update copyright header years'
116+
117+
# Ensure initial reaction job has completed before running this job:
118+
needs: [ manage_labels ]
119+
120+
# Define the conditions under which the job should run:
121+
if: |
122+
github.event.label.name == 'bot: Update Copyright Years'
123+
124+
# Run reusable workflow:
125+
uses: ./.github/workflows/update_pr_copyright_years.yml
126+
with:
127+
pull_request_number: ${{ github.event.pull_request.number }}
128+
secrets:
129+
REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }}
130+
STDLIB_BOT_GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_GITHUB_TOKEN }}
131+
STDLIB_BOT_GPG_PRIVATE_KEY: ${{ secrets.STDLIB_BOT_GPG_PRIVATE_KEY }}
132+
STDLIB_BOT_GPG_PASSPHRASE: ${{ secrets.STDLIB_BOT_GPG_PASSPHRASE }}
133+
134+
# Define a job for auto-fixing lint errors:
135+
fix_lint_errors:
136+
137+
# Define a display name:
138+
name: 'Auto-fix lint errors'
139+
140+
# Ensure initial reaction job has completed before running this job:
141+
needs: [ manage_labels ]
142+
143+
# Define the conditions under which the job should run:
144+
if: |
145+
github.event.label.name == 'bot: Lint Autofix'
146+
147+
# Run reusable workflow:
148+
uses: ./.github/workflows/lint_autofix.yml
149+
with:
150+
pull_request_number: ${{ github.event.pull_request.number }}
151+
secrets:
152+
REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }}
153+
STDLIB_BOT_GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_GITHUB_TOKEN }}
154+
STDLIB_BOT_GPG_PRIVATE_KEY: ${{ secrets.STDLIB_BOT_GPG_PRIVATE_KEY }}
155+
STDLIB_BOT_GPG_PASSPHRASE: ${{ secrets.STDLIB_BOT_GPG_PASSPHRASE }}
156+
157+
# Define a job for merging develop branch:
158+
merge_develop:
159+
160+
# Define a display name:
161+
name: 'Merge changes from develop branch into this PR'
162+
163+
# Ensure initial reaction job has completed before running this job:
164+
needs: [ manage_labels ]
165+
166+
# Define the conditions under which the job should run:
167+
if: |
168+
github.event.label.name == 'bot: Merge'
169+
170+
# Run reusable workflow:
171+
uses: ./.github/workflows/pr_merge_develop.yml
172+
with:
173+
pull_request_number: ${{ github.event.pull_request.number }}
174+
secrets:
175+
REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }}
176+
STDLIB_BOT_GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_GITHUB_TOKEN }}
177+
STDLIB_BOT_GPG_PRIVATE_KEY: ${{ secrets.STDLIB_BOT_GPG_PRIVATE_KEY }}
178+
STDLIB_BOT_GPG_PASSPHRASE: ${{ secrets.STDLIB_BOT_GPG_PASSPHRASE }}
179+
180+
# Define a job for rebasing on develop branch:
181+
rebase_develop:
182+
183+
# Define a display name:
184+
name: 'Rebase this PR on top of develop branch'
185+
186+
# Ensure initial reaction job has completed before running this job:
187+
needs: [ manage_labels ]
188+
189+
# Define the conditions under which the job should run:
190+
if: |
191+
github.event.label.name == 'bot: Rebase'
192+
193+
# Run reusable workflow:
194+
uses: ./.github/workflows/pr_rebase_develop.yml
195+
with:
196+
pull_request_number: ${{ github.event.pull_request.number }}
197+
secrets:
198+
REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }}
199+
STDLIB_BOT_GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_GITHUB_TOKEN }}
200+
STDLIB_BOT_GPG_PRIVATE_KEY: ${{ secrets.STDLIB_BOT_GPG_PRIVATE_KEY }}
201+
STDLIB_BOT_GPG_PASSPHRASE: ${{ secrets.STDLIB_BOT_GPG_PASSPHRASE }}
202+
203+
# Define a job for removing the in-progress label:
204+
remove_progress_label:
205+
206+
# Define a display name:
207+
name: 'Remove in-progress label'
208+
209+
# Define the type of virtual host machine:
210+
runs-on: ubuntu-latest
211+
212+
# Ensure all previous jobs have completed before running this job:
213+
needs: [ manage_labels, check_files, update_copyright_years, fix_lint_errors, merge_develop, rebase_develop ]
214+
215+
# Define the conditions under which the job should run:
216+
if: |
217+
github.event.label.name == 'bot: Merge' ||
218+
github.event.label.name == 'bot: Rebase' ||
219+
github.event.label.name == 'bot: Check Files' ||
220+
github.event.label.name == 'bot: Lint Autofix' ||
221+
github.event.label.name == 'bot: Update Copyright Years'
222+
223+
# Define the job's steps:
224+
steps:
225+
- name: Remove in-progress label
226+
# Run the step regardless of the outcome of previous steps:
227+
if: always()
228+
# Pin action to full length commit SHA
229+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
230+
with:
231+
github-token: ${{ secrets.STDLIB_BOT_GITHUB_TOKEN }}
232+
script: |
233+
try {
234+
await github.rest.issues.removeLabel({
235+
'owner': context.repo.owner,
236+
'repo': context.repo.repo,
237+
'issue_number': context.issue.number,
238+
'name': 'bot: In Progress'
239+
})
240+
} catch ( error ) {
241+
console.log( 'Error removing label: %s', error.message );
242+
}
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
#/
2+
# @license Apache-2.0
3+
#
4+
# Copyright (c) 2024 The Stdlib Authors.
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#/
18+
19+
# Workflow name:
20+
name: labeler_needs_changes
21+
22+
# Workflow triggers:
23+
on:
24+
pull_request_review:
25+
types: [submitted]
26+
27+
# Workflow jobs:
28+
jobs:
29+
30+
# Define a job which automatically labels pull requests as needing changes when a reviewer requests changes:
31+
add-needs-changes-label:
32+
33+
# Define job name:
34+
name: 'Add "Needs Changes" Label when Reviewer Requests Changes'
35+
36+
# Only run this job if the reviewer requested changes (but do not run on forks due to missing permissions):
37+
if: ${{ github.repository == 'stdlib-js/stdlib' && github.event.review.state == 'changes_requested' }}
38+
39+
# Define job permissions:
40+
permissions:
41+
contents: read
42+
pull-requests: write
43+
44+
# Define the type of virtual host machine:
45+
runs-on: ubuntu-latest
46+
47+
# Define the sequence of job steps:
48+
steps:
49+
50+
# Add "Needs Changes" label:
51+
- name: 'Add "Needs Changes" label'
52+
# Pin action to a known commit SHA for reproducibility:
53+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
54+
with:
55+
github-token: ${{ secrets.CHATBOT_GITHUB_TOKEN }}
56+
script: |
57+
await github.rest.issues.addLabels({
58+
'owner': context.repo.owner,
59+
'repo': context.repo.repo,
60+
'issue_number': context.payload.pull_request.number,
61+
'labels': [ 'Needs Changes' ]
62+
})

.github/workflows/run_tests_coverage.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,8 +293,8 @@ jobs:
293293
git fetch origin $BRANCH_NAME || true
294294
git checkout $BRANCH_NAME || git checkout -b $BRANCH_NAME
295295
296-
# Remove all files from the branch:
297-
git rm -rf .
296+
# Remove all directories except .github and .git from branch:
297+
find . -mindepth 1 -maxdepth 1 -type d -not -name '.github' -not -name '.git' -exec git rm -rf {} +
298298
else
299299
BRANCH_NAME="main"
300300
fi

lib/node_modules/@stdlib/array/base/cartesian-square/README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,14 @@ var out = cartesianSquare( x );
8282

8383
<section class="related">
8484

85+
* * *
86+
87+
## See Also
88+
89+
- <span class="package-name">[`@stdlib/array/cartesian-square`][@stdlib/array/cartesian-square]</span><span class="delimiter">: </span><span class="description">return the Cartesian square.</span>
90+
- <span class="package-name">[`@stdlib/array/base/cartesian-power`][@stdlib/array/base/cartesian-power]</span><span class="delimiter">: </span><span class="description">return the Cartesian power.</span>
91+
- <span class="package-name">[`@stdlib/array/base/cartesian-product`][@stdlib/array/base/cartesian-product]</span><span class="delimiter">: </span><span class="description">return the Cartesian product.</span>
92+
8593
</section>
8694

8795
<!-- /.related -->
@@ -92,6 +100,16 @@ var out = cartesianSquare( x );
92100

93101
[cartesian-product]: https://en.wikipedia.org/wiki/Cartesian_product
94102

103+
<!-- <related-links> -->
104+
105+
[@stdlib/array/cartesian-square]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/cartesian-square
106+
107+
[@stdlib/array/base/cartesian-power]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/cartesian-power
108+
109+
[@stdlib/array/base/cartesian-product]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/cartesian-product
110+
111+
<!-- </related-links> -->
112+
95113
</section>
96114

97115
<!-- /.links -->

lib/node_modules/@stdlib/blas/base/dznrm2/src/dznrm2_cblas.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ double API_SUFFIX(c_dznrm2)( const CBLAS_INT N, const void *ZX, const CBLAS_INT
4141
* @param strideX ZX stride length
4242
* @param offsetX starting index for ZX
4343
*/
44-
double API_SUFFIX(c_dznrm2_ndarray)( const CBLAS_INT N, const void *ZX, const CBLAS_INT strideX , const CBLAS_INT offsetX ) {
44+
double API_SUFFIX(c_dznrm2_ndarray)( const CBLAS_INT N, const void *ZX, const CBLAS_INT strideX, const CBLAS_INT offsetX ) {
4545
stdlib_complex128_t *zx = (stdlib_complex128_t *)ZX;
4646
zx += stdlib_strided_min_view_buffer_index( N, strideX, offsetX );
4747
return API_SUFFIX(cblas_dznrm2)( N, (void *)zx, strideX );

lib/node_modules/@stdlib/blas/ext/base/ssorthp/src/addon.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ static napi_value addon( napi_env env, napi_callback_info info ) {
3838
STDLIB_NAPI_ARGV_FLOAT( env, order, argv, 1 );
3939
STDLIB_NAPI_ARGV_INT64( env, stride, argv, 3 );
4040
STDLIB_NAPI_ARGV_STRIDED_FLOAT32ARRAY( env, X, N, stride, argv, 2 );
41-
c_ssorthp( N, order, X , stride );
41+
c_ssorthp( N, order, X, stride );
4242
return NULL;
4343
}
4444

lib/node_modules/@stdlib/math/base/assert/is-composite/examples/c/example.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#include <stdbool.h>
2222

2323
int main( void ) {
24-
const double x[] = { 0.0, 0.0/0.0, 1.0, -1.0 , 4.0 };
24+
const double x[] = { 0.0, 0.0/0.0, 1.0, -1.0, 4.0 };
2525

2626
bool r;
2727
int i;

lib/node_modules/@stdlib/math/base/special/ellipk/src/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ double stdlib_base_ellipk( const double m ) {
358358
return STDLIB_CONSTANT_FLOAT64_PINF;
359359
}
360360
if ( x > 1.0 ) {
361-
return 0.0 / 0.0; //NaN
361+
return 0.0 / 0.0; // NaN
362362
}
363363
if ( x < 0.1 ) {
364364
t = poly_p1( x - 0.05 );
@@ -384,7 +384,7 @@ double stdlib_base_ellipk( const double m ) {
384384
td = 1.0 - x;
385385
qd = poly_p11( td );
386386
kdm = poly_p12( td - 0.05 );
387-
t = -stdlib_base_ln( qd ) * ( kdm * ONE_DIV_PI );
387+
t = -stdlib_base_ln( qd ) * ( kdm * ONE_DIV_PI );
388388
}
389389
if ( FLG == 1 ) {
390390
// Complete the transformation mentioned above for m < 0:

0 commit comments

Comments
 (0)