Skip to content

Commit 6a48687

Browse files
committed
DOC: add contributing guidelines
[ci skip]
1 parent 547f983 commit 6a48687

File tree

1 file changed

+77
-0
lines changed

1 file changed

+77
-0
lines changed

CONTRIBUTING.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# Contributing to the `numpy-release` repository
2+
3+
This repository has fairly strict contribution rules for security and
4+
auditability reasons, as explained in the README. PRs with improvements or bug
5+
fixes are very welcome, however CI jobs will not run for anyone who doesn't
6+
have commit access.
7+
8+
9+
## Running CI jobs on your own fork
10+
11+
To get CI to run on your own fork for changes in a branch named
12+
`my-branch-name`, add a temporary commit to your branch that adds a trigger:
13+
14+
```diff
15+
--- a/.github/workflows/wheels.yml
16+
+++ b/.github/workflows/wheels.yml
17+
@@ -22,6 +22,7 @@ on:
18+
push:
19+
branches:
20+
- main
21+
+ - my-branch-name
22+
workflow_dispatch:
23+
inputs:
24+
environment:
25+
```
26+
If you title the commit, e.g., `DEBUG: run on fork`, it's easy to drop the
27+
commit again once you're done testing and before opening a PR to the
28+
`numpy/numpy-release` repository.
29+
30+
Note that this will run *a lot of jobs*. If you're doing iterative testing,
31+
it's recommended to only select the platform(s) you're interested in like this:
32+
33+
```diff
34+
--- a/.github/workflows/wheels.yml
35+
+++ b/.github/workflows/wheels.yml
36+
@@ -22,6 +22,7 @@ on:
37+
push:
38+
branches:
39+
- main
40+
+ - my-branch-name
41+
workflow_dispatch:
42+
inputs:
43+
environment:
44+
@@ -48,20 +49,8 @@ jobs:
45+
# Github Actions doesn't support pairing matrix values together, let's improvise
46+
# https://github.com/github/feedback/discussions/7835#discussioncomment-1769026
47+
buildplat:
48+
- - [ubuntu-22.04, manylinux_x86_64, ""]
49+
- - [ubuntu-22.04, musllinux_x86_64, ""]
50+
- - [ubuntu-22.04-arm, manylinux_aarch64, ""]
51+
- [ubuntu-22.04-arm, musllinux_aarch64, ""]
52+
- - [macos-13, macosx_x86_64, openblas]
53+
-
54+
- # targeting macos >= 14. Could probably build on macos-14, but it would be a cross-compile
55+
- - [macos-13, macosx_x86_64, accelerate]
56+
- - [macos-14, macosx_arm64, openblas]
57+
- - [macos-14, macosx_arm64, accelerate]
58+
- - [windows-2022, win_amd64, ""]
59+
- - [windows-2022, win32, ""]
60+
- - [windows-11-arm, win_arm64, ""]
61+
- python: ["cp311", "cp312", "cp313", "cp313t", "cp314", "cp314t", "pp311"]
62+
+ python: ["cp314", "cp314t"]
63+
exclude:
64+
# Don't build PyPy 32-bit windows
65+
- buildplat: [windows-2022, win32, ""]
66+
```
67+
68+
69+
## Commit messages and linear history
70+
71+
Please use the same [commit message format as for the main `numpy` repository](https://numpy.org/devdocs/dev/development_workflow.html#writing-the-commit-message).
72+
73+
This repository requires linear history. It's preferred that contributors edit
74+
their commit history so the PRs they submit contain clean, independent commits.
75+
Note that each commit should be able to pass CI - if one commit depends on
76+
another, they should be merged. Maintainers may decide to squash-merge if those
77+
requirements aren't met.

0 commit comments

Comments
 (0)