Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into Add-C-implementa…
Browse files Browse the repository at this point in the history
…tions-to-base-special-math-functions
  • Loading branch information
stdlib-bot committed Dec 20, 2024
2 parents dc85b7f + 0fc382d commit b4d5212
Show file tree
Hide file tree
Showing 565 changed files with 37,444 additions and 239 deletions.
242 changes: 242 additions & 0 deletions .github/workflows/label_commands.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,242 @@
#/
# @license Apache-2.0
#
# Copyright (c) 2024 The Stdlib Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#/

# Workflow name:
name: label_commands

# Workflow triggers:
on:
pull_request_target:
types:
- labeled

# Workflow jobs:
jobs:

# Define a job for removing the label and adding in-progress label:
manage_labels:

# Define a display name:
name: 'Manage labels'

# Define the type of virtual host machine:
runs-on: ubuntu-latest

# Define the conditions under which the job should run:
if: |
github.event.label.name == 'bot: Merge' ||
github.event.label.name == 'bot: Rebase' ||
github.event.label.name == 'bot: Check Files' ||
github.event.label.name == 'bot: Lint Autofix' ||
github.event.label.name == 'bot: Update Copyright Years'
# Define the job's steps:
steps:

- name: 'Remove label'
# Pin action to full length commit SHA
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
github-token: ${{ secrets.STDLIB_BOT_GITHUB_TOKEN }}
script: |
try {
await github.rest.issues.removeLabel({
'owner': context.repo.owner,
'repo': context.repo.repo,
'issue_number': context.issue.number,
'name': '${{ github.event.label.name }}'
})
} catch ( error ) {
console.log( 'Error removing label: %s', error.message );
}
- name: 'Add in-progress label'
# Pin action to full length commit SHA
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
github-token: ${{ secrets.STDLIB_BOT_GITHUB_TOKEN }}
script: |
github.rest.issues.addLabels({
'owner': context.repo.owner,
'repo': context.repo.repo,
'issue_number': context.issue.number,
'labels': ['bot: In Progress']
})
# Add initial reaction to comment with slash command:
- name: 'Add initial reaction'
run: |
curl -X POST \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: Bearer ${{ secrets.STDLIB_BOT_GITHUB_TOKEN }}" \
"https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/reactions" \
-d '{"content":"eyes"}'
# Define a job for checking for required files:
check_files:

# Define a display name:
name: 'Check for required files'

# Ensure initial reaction job has completed before running this job:
needs: [ manage_labels ]

# Define the conditions under which the job should run:
if: |
github.event.label.name == 'bot: Check Files'
# Run reusable workflow:
uses: ./.github/workflows/check_required_files.yml
with:
pull_request_number: ${{ github.event.pull_request.number }}
user: ${{ github.event.sender.login }}
secrets:
STDLIB_BOT_GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_GITHUB_TOKEN }}

# Define a job for updating copyright header years:
update_copyright_years:

# Define a display name:
name: 'Update copyright header years'

# Ensure initial reaction job has completed before running this job:
needs: [ manage_labels ]

# Define the conditions under which the job should run:
if: |
github.event.label.name == 'bot: Update Copyright Years'
# Run reusable workflow:
uses: ./.github/workflows/update_pr_copyright_years.yml
with:
pull_request_number: ${{ github.event.pull_request.number }}
secrets:
REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }}
STDLIB_BOT_GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_GITHUB_TOKEN }}
STDLIB_BOT_GPG_PRIVATE_KEY: ${{ secrets.STDLIB_BOT_GPG_PRIVATE_KEY }}
STDLIB_BOT_GPG_PASSPHRASE: ${{ secrets.STDLIB_BOT_GPG_PASSPHRASE }}

# Define a job for auto-fixing lint errors:
fix_lint_errors:

# Define a display name:
name: 'Auto-fix lint errors'

# Ensure initial reaction job has completed before running this job:
needs: [ manage_labels ]

# Define the conditions under which the job should run:
if: |
github.event.label.name == 'bot: Lint Autofix'
# Run reusable workflow:
uses: ./.github/workflows/lint_autofix.yml
with:
pull_request_number: ${{ github.event.pull_request.number }}
secrets:
REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }}
STDLIB_BOT_GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_GITHUB_TOKEN }}
STDLIB_BOT_GPG_PRIVATE_KEY: ${{ secrets.STDLIB_BOT_GPG_PRIVATE_KEY }}
STDLIB_BOT_GPG_PASSPHRASE: ${{ secrets.STDLIB_BOT_GPG_PASSPHRASE }}

# Define a job for merging develop branch:
merge_develop:

# Define a display name:
name: 'Merge changes from develop branch into this PR'

# Ensure initial reaction job has completed before running this job:
needs: [ manage_labels ]

# Define the conditions under which the job should run:
if: |
github.event.label.name == 'bot: Merge'
# Run reusable workflow:
uses: ./.github/workflows/pr_merge_develop.yml
with:
pull_request_number: ${{ github.event.pull_request.number }}
secrets:
REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }}
STDLIB_BOT_GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_GITHUB_TOKEN }}
STDLIB_BOT_GPG_PRIVATE_KEY: ${{ secrets.STDLIB_BOT_GPG_PRIVATE_KEY }}
STDLIB_BOT_GPG_PASSPHRASE: ${{ secrets.STDLIB_BOT_GPG_PASSPHRASE }}

# Define a job for rebasing on develop branch:
rebase_develop:

# Define a display name:
name: 'Rebase this PR on top of develop branch'

# Ensure initial reaction job has completed before running this job:
needs: [ manage_labels ]

# Define the conditions under which the job should run:
if: |
github.event.label.name == 'bot: Rebase'
# Run reusable workflow:
uses: ./.github/workflows/pr_rebase_develop.yml
with:
pull_request_number: ${{ github.event.pull_request.number }}
secrets:
REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }}
STDLIB_BOT_GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_GITHUB_TOKEN }}
STDLIB_BOT_GPG_PRIVATE_KEY: ${{ secrets.STDLIB_BOT_GPG_PRIVATE_KEY }}
STDLIB_BOT_GPG_PASSPHRASE: ${{ secrets.STDLIB_BOT_GPG_PASSPHRASE }}

# Define a job for removing the in-progress label:
remove_progress_label:

# Define a display name:
name: 'Remove in-progress label'

# Define the type of virtual host machine:
runs-on: ubuntu-latest

# Ensure all previous jobs have completed before running this job:
needs: [ manage_labels, check_files, update_copyright_years, fix_lint_errors, merge_develop, rebase_develop ]

# Define the conditions under which the job should run:
if: |
github.event.label.name == 'bot: Merge' ||
github.event.label.name == 'bot: Rebase' ||
github.event.label.name == 'bot: Check Files' ||
github.event.label.name == 'bot: Lint Autofix' ||
github.event.label.name == 'bot: Update Copyright Years'
# Define the job's steps:
steps:
- name: Remove in-progress label
# Run the step regardless of the outcome of previous steps:
if: always()
# Pin action to full length commit SHA
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
github-token: ${{ secrets.STDLIB_BOT_GITHUB_TOKEN }}
script: |
try {
await github.rest.issues.removeLabel({
'owner': context.repo.owner,
'repo': context.repo.repo,
'issue_number': context.issue.number,
'name': 'bot: In Progress'
})
} catch ( error ) {
console.log( 'Error removing label: %s', error.message );
}
62 changes: 62 additions & 0 deletions .github/workflows/labeler_needs_changes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
#/
# @license Apache-2.0
#
# Copyright (c) 2024 The Stdlib Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#/

# Workflow name:
name: labeler_needs_changes

# Workflow triggers:
on:
pull_request_review:
types: [submitted]

# Workflow jobs:
jobs:

# Define a job which automatically labels pull requests as needing changes when a reviewer requests changes:
add-needs-changes-label:

# Define job name:
name: 'Add "Needs Changes" Label when Reviewer Requests Changes'

# Only run this job if the reviewer requested changes (but do not run on forks due to missing permissions):
if: ${{ github.repository == 'stdlib-js/stdlib' && github.event.review.state == 'changes_requested' }}

# Define job permissions:
permissions:
contents: read
pull-requests: write

# Define the type of virtual host machine:
runs-on: ubuntu-latest

# Define the sequence of job steps:
steps:

# Add "Needs Changes" label:
- name: 'Add "Needs Changes" label'
# Pin action to a known commit SHA for reproducibility:
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
github-token: ${{ secrets.CHATBOT_GITHUB_TOKEN }}
script: |
await github.rest.issues.addLabels({
'owner': context.repo.owner,
'repo': context.repo.repo,
'issue_number': context.payload.pull_request.number,
'labels': [ 'Needs Changes' ]
})
3 changes: 3 additions & 0 deletions .github/workflows/run_tests_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,9 @@ jobs:
BRANCH_NAME="pr-${{ github.event.pull_request.number }}"
git fetch origin $BRANCH_NAME || true
git checkout $BRANCH_NAME || git checkout -b $BRANCH_NAME
# Remove all directories except .github and .git from branch:
find . -mindepth 1 -maxdepth 1 -type d -not -name '.github' -not -name '.git' -exec git rm -rf {} +
else
BRANCH_NAME="main"
fi
Expand Down
2 changes: 2 additions & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ Pranav Goswami <[email protected]> Pranav

Pranjal Jha <[email protected]> PraneGIT

Prashant Kumar Yadav <[email protected]> JoyBoy

Pratik Singh <[email protected]> Pratik772846

Pratyush Kumar Chouhan <[email protected]> <[email protected]>
Expand Down
2 changes: 2 additions & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Dan Rose <[email protected]>
Daniel Killenberger <[email protected]>
Daniel Yu <[email protected]>
Debashis Maharana <[email protected]>
Desh Deepak Kant <[email protected]>
Divyansh Seth <[email protected]>
Dominic Lim <[email protected]>
Dominik Moritz <[email protected]>
Expand Down Expand Up @@ -75,6 +76,7 @@ Philipp Burckhardt <[email protected]>
Prajwal Kulkarni <[email protected]>
Pranav Goswami <[email protected]>
Pranjal Jha <[email protected]>
Prashant Kumar Yadav <[email protected]>
Pratik Singh <[email protected]>
Pratyush Kumar Chouhan <[email protected]>
Priyansh Prajapati <[email protected]>
Expand Down
18 changes: 18 additions & 0 deletions lib/node_modules/@stdlib/array/base/cartesian-square/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,14 @@ var out = cartesianSquare( x );

<section class="related">

* * *

## See Also

- <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>
- <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>
- <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>

</section>

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

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

<!-- <related-links> -->

[@stdlib/array/cartesian-square]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/cartesian-square

[@stdlib/array/base/cartesian-power]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/cartesian-power

[@stdlib/array/base/cartesian-product]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/cartesian-product

<!-- </related-links> -->

</section>

<!-- /.links -->
12 changes: 12 additions & 0 deletions lib/node_modules/@stdlib/array/base/filled5d-by/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,12 @@ out = filled5dBy( [ 1, 1, 1, 1, 3 ], constantFunction( void 0 ) );

<section class="related">

* * *

## See Also

- <span class="package-name">[`@stdlib/array/base/filled5d`][@stdlib/array/base/filled5d]</span><span class="delimiter">: </span><span class="description">create a filled five-dimensional nested array.</span>

</section>

<!-- /.related -->
Expand All @@ -142,6 +148,12 @@ out = filled5dBy( [ 1, 1, 1, 1, 3 ], constantFunction( void 0 ) );

<section class="links">

<!-- <related-links> -->

[@stdlib/array/base/filled5d]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/filled5d

<!-- </related-links> -->

</section>

<!-- /.links -->
Loading

0 comments on commit b4d5212

Please sign in to comment.