Skip to content

Commit 547f983

Browse files
committed
DOC: add a README
1 parent a4de31d commit 547f983

File tree

1 file changed

+71
-0
lines changed

1 file changed

+71
-0
lines changed

README.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# NumPy wheels and release tooling
2+
3+
This repository contains what is needed to build release artifacts (wheels and
4+
sdist) for the official [NumPy releases to
5+
PyPI](https://pypi.org/project/numpy/) as well as nightly wheel builds which
6+
are uploaded to
7+
[anaconda.org/scientific-python-nightly-wheels/numpy](https://anaconda.org/scientific-python-nightly-wheels/numpy).
8+
9+
This repository is minimal on purpose, for security reasons it contains only what is absolutely necessary. The repository settings are stricter than on the main [numpy/numpy](https://github.com/numpy/numpy/) repository, for example:
10+
11+
- only the release & CI team has write access
12+
- for PRs from anyone without write access, CI will always need manual approval
13+
- linear history is required
14+
- GitHub actions are whitelisted, only the necessary ones will be allowed
15+
- no caching allowed, only clean builds from scratch
16+
- no self-hosted runners are allowed
17+
18+
See [numpy#29178](https://github.com/numpy/numpy/issues/29178) for more context.
19+
20+
21+
## Branches and tags
22+
23+
The `main` branch of this repository is meant to stay in sync with the `main` branch
24+
of the [numpy/numpy](https://github.com/numpy/numpy) repository. It runs scheduled builds
25+
as cron jobs twice a week, and uploads nightlies to
26+
[https://anaconda.org/scientific-python-nightly-wheels/numpy](anaconda.org/scientific-python-nightly-wheels/numpy).
27+
28+
For NumPy releases, the branch naming should match those of the main
29+
`numpy/numpy` repository, e.g., `maintenance/2.3.x` for the 2.3.x releases.
30+
31+
Which branch, commit or tag is built when a set of wheel builds is triggered is
32+
controlled by the `SOURCE_REF_TO_BUILD` variable at the top of
33+
`.github/workflows/wheels.yml`.
34+
35+
36+
## Build reproducibility
37+
38+
Wheel builds being fully reproducible is a long-term goal for this repository.
39+
All dependencies and actions must be pinned, which allows us to already be
40+
close to full reproducibility. However, we don't (yet) have full control over
41+
all ingredients that go into a wheel build, e.g. the containers which GitHub
42+
Actions provide may change over time.
43+
44+
45+
## Trusted publishing and attestations
46+
47+
The release builds in this repository should be using trusted publishing to
48+
publish directly to PyPI (and TestPyPI), including attestations. Triggering
49+
a release build has to be done by the `workflow_dispatch` in the
50+
[Actions UI in this repository](https://github.com/numpy/numpy-release/actions/workflows/wheels.yml),
51+
selecting `pypi` or `testpypi` as the target. This will use a GitHub Actions
52+
"environment" of the same name - before the uploads to PyPI actually happen,
53+
the release manager can go in and inspect the build logs and produced wheels.
54+
Once those look good, the release manager can finalize the release from the
55+
[deployments page in this repository](https://github.com/numpy/numpy-release/deployments).
56+
57+
58+
## Software Bill of Materials
59+
60+
We aim to start producing SBOMs and ship them inside NumPy wheels uploaded to
61+
PyPI, however as of today that is not implemented.
62+
63+
64+
## Security
65+
66+
To report a security vulnerability for NumPy itself, please see
67+
[the security policy on the main repo](https://github.com/numpy/numpy/?tab=security-ov-file#readme).
68+
69+
To discuss a supply chain security related topic for the code in this
70+
repository, please open an issue on this repository if it can be discussed in
71+
public, and otherwise please follow the security policy on the main repo.

0 commit comments

Comments
 (0)