Skip to content

Commit ef4eba3

Browse files
Merge branch 'develop' of https://github.com/Neerajpathak07/stdlib into add-betaprime-pdf
2 parents 5ad1cd7 + 9b938de commit ef4eba3

File tree

11,550 files changed

+563087
-187020
lines changed

Some content is hidden

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

11,550 files changed

+563087
-187020
lines changed

.github/workflows/autoclose.yml

Lines changed: 65 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,6 @@ jobs:
3737
# Only run this job if the pull request has a specific label:
3838
if: "${{ github.event.label.name == 'autoclose: EditorConfig' }}"
3939

40-
# Define job permissions:
41-
permissions:
42-
contents: read
43-
pull-requests: write
44-
4540
# Define the type of virtual host machine:
4641
runs-on: ubuntu-latest
4742

@@ -58,7 +53,7 @@ jobs:
5853
BODY: |
5954
Thank you for working on this pull request. However, we cannot accept your contribution as this pull request does not follow our [contributing guidelines](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md).
6055
61-
Per the guidelines outlined in our [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md), you should download and setup [EditorConfig](http://editorconfig.org/) to ensure that files are automatically configured to use expected indentation and line endings.
56+
Per the guidelines outlined in our [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/contributing/development.md), you should download and setup [EditorConfig](http://editorconfig.org/) to ensure that files are automatically configured to use expected indentation and line endings.
6257
6358
If you would prefer to avoid manual setup, you could also consider using a pre-configured [development container](https://github.com/stdlib-js/stdlib/tree/develop/.devcontainer) for use locally or in GitHub Codespaces.
6459
@@ -73,11 +68,6 @@ jobs:
7368
# Only run this job if the pull request has a specific label:
7469
if: "${{ github.event.label.name == 'autoclose: Contributor Guidelines' }}"
7570

76-
# Define job permissions:
77-
permissions:
78-
contents: read
79-
pull-requests: write
80-
8171
# Define the type of virtual host machine:
8272
runs-on: ubuntu-latest
8373

@@ -94,7 +84,7 @@ jobs:
9484
BODY: |
9585
Thank you for working on this pull request. However, we cannot accept your contribution as this pull request does not follow our [contributing guidelines](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md).
9686
97-
Per the guidelines outlined in our [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md), you should have setup your local development environment such that automated development processes for linting, license verification, and unit testing can run prior to authoring commits and pushing changes. We encourage you to refer to that guide **before** continuing to work on this pull request.
87+
Per the guidelines outlined in our [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/contributing/development.md), you should have setup your local development environment such that automated development processes for linting, license verification, and unit testing can run prior to authoring commits and pushing changes. We encourage you to refer to that guide **before** continuing to work on this pull request.
9888
9989
If you would prefer to avoid manual setup, you could also consider using a pre-configured [development container](https://github.com/stdlib-js/stdlib/tree/develop/.devcontainer) for use locally or in GitHub Codespaces.
10090
@@ -109,11 +99,6 @@ jobs:
10999
# Only run this job if the pull request has a specific label:
110100
if: "${{ github.event.label.name == 'autoclose: Project Conventions' }}"
111101

112-
# Define job permissions:
113-
permissions:
114-
contents: read
115-
pull-requests: write
116-
117102
# Define the type of virtual host machine:
118103
runs-on: ubuntu-latest
119104

@@ -149,11 +134,6 @@ jobs:
149134
# Only run this job if the pull request has a specific label:
150135
if: "${{ github.event.label.name == 'autoclose: Spam' }}"
151136

152-
# Define job permissions:
153-
permissions:
154-
contents: read
155-
pull-requests: write
156-
157137
# Define the type of virtual host machine:
158138
runs-on: ubuntu-latest
159139

@@ -189,12 +169,6 @@ jobs:
189169
# Only run this job if the pull request has a specific label:
190170
if: "${{ github.event.label.name == 'autoclose: Stale' }}"
191171

192-
# Define job permissions:
193-
permissions:
194-
contents: read
195-
issues: write
196-
pull-requests: write
197-
198172
# Define the type of virtual host machine:
199173
runs-on: ubuntu-latest
200174

@@ -211,3 +185,66 @@ jobs:
211185
This pull request has been automatically closed because it has been inactive for an extended period after changes were requested. If you still wish to pursue this contribution, feel free to reopen the pull request or submit a new one.
212186
213187
We appreciate your interest in contributing to stdlib!
188+
189+
# Define a job which closes a pull request if a PR has an inappropriate Git history:
190+
git_history:
191+
192+
# Define job name:
193+
name: 'Check for Git History label'
194+
195+
# Only run this job if the pull request has a specific label:
196+
if: "${{ github.event.label.name == 'autoclose: Git History' }}"
197+
198+
# Define the type of virtual host machine:
199+
runs-on: ubuntu-latest
200+
201+
# Define the sequence of job steps:
202+
steps:
203+
204+
# Close the pull request:
205+
- name: 'Close pull request'
206+
run: gh pr close "$NUMBER" --comment "$BODY"
207+
env:
208+
GH_TOKEN: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }}
209+
GH_REPO: ${{ github.repository }}
210+
NUMBER: ${{ github.event.pull_request.number }}
211+
BODY: |
212+
Thank you for working on this pull request. However, we cannot accept your contribution due to Git history issues.
213+
214+
Some common issues include:
215+
216+
- Merge conflicts
217+
- Inappropriate commit messages
218+
- Unrelated commits
219+
- Including changes from merged branches that weren't intended for this PR
220+
221+
We recommend opening a new pull request with only the intended changes.
222+
223+
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.
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
#/
2+
# @license Apache-2.0
3+
#
4+
# Copyright (c) 2025 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: check_commit_metadata
21+
22+
# Workflow triggers:
23+
on:
24+
# Trigger on pull request events:
25+
pull_request_target:
26+
types:
27+
- opened
28+
29+
# Global permissions:
30+
permissions:
31+
# Allow read-only access to the repository contents:
32+
contents: read
33+
34+
# Workflow jobs:
35+
jobs:
36+
37+
# Define a job for checking the commit metadata for whether local development is properly setup...
38+
check_commit_metadata:
39+
40+
# Define a display name:
41+
name: 'Check Commit Metadata'
42+
43+
# Define the type of virtual host machine:
44+
runs-on: ubuntu-latest
45+
46+
# Temporarily disable the entire workflow:
47+
if: false
48+
49+
# Define the sequence of job steps...
50+
steps:
51+
# Checkout the repository:
52+
- name: 'Checkout repository'
53+
# Pin action to full length commit SHA
54+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
55+
with:
56+
# Ensure we have access to the scripts directory:
57+
sparse-checkout: |
58+
.github/workflows/scripts
59+
sparse-checkout-cone-mode: false
60+
timeout-minutes: 10
61+
62+
# Extract commit metadata from commit messages as JSON:
63+
- name: 'Extract commit metadata'
64+
id: extract-metadata
65+
# Pin action to full length commit SHA
66+
uses: stdlib-js/metadata-action@3ccf68f24c51ae23470319e8e5619d539df8212b # v3.0.0
67+
68+
# Check commit metadata:
69+
- name: 'Check commit metadata'
70+
env:
71+
PR_NUMBER: ${{ github.event.pull_request.number }}
72+
COMMIT_METADATA: ${{ steps.extract-metadata.outputs.metadata }}
73+
GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }}
74+
run: |
75+
. "$GITHUB_WORKSPACE/.github/workflows/scripts/check_commit_metadata" $PR_NUMBER $COMMIT_METADATA

.github/workflows/check_contributing_guidelines_acceptance.yml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,13 @@ on:
4343
types:
4444
- opened
4545
- reopened
46+
- edited
4647

4748
# Global permissions:
4849
permissions:
4950
# Allow read-only access to the repository contents:
5051
contents: read
5152

52-
# Allow write access to pull requests:
53-
pull-requests: write
54-
5553
# Workflow jobs:
5654
jobs:
5755

@@ -74,14 +72,10 @@ jobs:
7472
# Pin action to full length commit SHA
7573
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
7674
with:
77-
# Specify whether to remove untracked files before checking out the repository:
78-
clean: true
79-
80-
# Limit clone depth to the most recent commit:
81-
fetch-depth: 1
82-
83-
# Specify whether to download Git-LFS files:
84-
lfs: false
75+
# Ensure we have access to the scripts directory:
76+
sparse-checkout: |
77+
.github/workflows/scripts
78+
sparse-checkout-cone-mode: false
8579
timeout-minutes: 10
8680

8781
# Check contributing guidelines acceptance:

.github/workflows/check_licenses.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ jobs:
128128
# Upload the log file:
129129
- name: 'Upload log file'
130130
# Pin action to full length commit SHA
131-
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
131+
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
132132
if: always()
133133
with:
134134
# Define a name for the uploaded artifact:

.github/workflows/create_address_commit_comment_issues.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,10 @@ jobs:
5555
# Pin action to full length commit SHA
5656
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
5757
with:
58-
# Specify whether to remove untracked files before checking out the repository:
59-
clean: false
60-
61-
# Limit clone depth to the most recent commit:
62-
fetch-depth: 1
63-
64-
# Specify whether to download Git-LFS files:
65-
lfs: false
58+
# Ensure we have access to the scripts directory:
59+
sparse-checkout: |
60+
.github/workflows/scripts
61+
sparse-checkout-cone-mode: false
6662
timeout-minutes: 10
6763

6864
# Create issues from commit comments:

.github/workflows/generate_pr_commit_message.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,6 @@ permissions:
3030
# Allow read-only access to the repository contents:
3131
contents: read
3232

33-
# Allow write access to issues, assignees, labels, and milestones:
34-
issues: write
35-
36-
# Allow write access to pull requests:
37-
pull-requests: write
38-
3933
# Workflow jobs:
4034
jobs:
4135

@@ -62,8 +56,11 @@ jobs:
6256
# Pin action to full length commit SHA
6357
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
6458
with:
65-
# Fetch all commits to ensure we have the full commit history:
66-
fetch-depth: 0
59+
# Ensure we have access to the scripts directory and .mailmap file for generating the commit message:
60+
sparse-checkout: |
61+
.github/workflows/scripts
62+
.mailmap
63+
sparse-checkout-cone-mode: false
6764

6865
# Generate commit message:
6966
- name: 'Generate commit message'

.github/workflows/good_first_issue.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ jobs:
4040
# Define job permissions:
4141
permissions:
4242
contents: read
43-
pull-requests: write
4443

4544
# Define the type of virtual host machine:
4645
runs-on: ubuntu-latest
@@ -65,7 +64,7 @@ jobs:
6564
1. **You cannot "claim" issues.** People new to open source often want to "claim" or be assigned an issue before beginning work. The typical rationale is that people want to avoid wasted work in the event that someone else ends up working the issue. However, this practice is not effective in open source, as it often leads to "issue squatting", in which an individual asks to be assigned, is granted their request, and then never ends up working on the issue. Accordingly, you are encouraged to communicate your intent to address this issue, ideally by providing a rough outline as to how you plan to address the issue or asking clarifying questions, but, at the end of the day, we will take running code and rough consensus in order to move forward quickly.
6665
2. **We have a very high bar for contributions.** We have very high standards for contributions and expect all contributions—whether new features, tests, or documentation—to be rigorous, thorough, and complete. Once a pull request is merged into stdlib, that contribution immediately becomes the collective responsibility of all maintainers of stdlib. When we merge code into stdlib, we are saying that we, the maintainers, commit to reviewing subsequent changes and making bugfixes to the code. Hence, in order to ensure future maintainability, this naturally leads to a higher standard of contribution.
6766
68-
Before working on this issue and opening a pull request, please read the project's [contributing guidelines](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md). These guidelines and the associated [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) provide important information, including links to stdlib's [Code of Conduct](https://github.com/stdlib-js/stdlib/blob/develop/CODE_OF_CONDUCT.md), license policy, and steps for setting up your local development environment.
67+
Before working on this issue and opening a pull request, please read the project's [contributing guidelines](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md). These guidelines and the associated [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/contributing/development.md) provide important information, including links to stdlib's [Code of Conduct](https://github.com/stdlib-js/stdlib/blob/develop/CODE_OF_CONDUCT.md), license policy, and steps for setting up your local development environment.
6968
7069
To reiterate, we **strongly** encourage you to refer to our contributing guides **before** beginning work on this issue. Failure to follow our guidelines significantly decreases the likelihood that you'll successfully contribute to stdlib and may result in automatic closure of a pull request without review.
7170

0 commit comments

Comments
 (0)