Skip to content

Commit 6a1a23b

Browse files
committed
Merge branch 'main' into atleast_1d
2 parents 2e2ccee + aa0cc04 commit 6a1a23b

File tree

232 files changed

+3471
-1446
lines changed

Some content is hidden

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

232 files changed

+3471
-1446
lines changed

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
. venv/bin/activate
7575
cd doc
7676
# Don't use -q, show warning summary"
77-
SPHINXOPTS="-j2 -n" make -e html
77+
SPHINXOPTS="-n" make -e html
7878
if [[ $(find build/html -type f | wc -l) -lt 1000 ]]; then
7979
echo "doc build failed: build/html is empty"
8080
exit -1
@@ -85,7 +85,7 @@ jobs:
8585
command: |
8686
. venv/bin/activate
8787
cd doc/neps
88-
SPHINXOPTS="-j2 -n" make -e html || echo "ignoring errors for now"
88+
SPHINXOPTS="-n" make -e html || echo "ignoring errors for now"
8989
9090
- store_artifacts:
9191
path: doc/build/html/

.github/workflows/cygwin.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
cd tools
6363
/usr/bin/python3.9 -m pytest --pyargs numpy -n2 -m "not slow"
6464
- name: Upload wheel if tests fail
65-
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
65+
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
6666
if: failure()
6767
with:
6868
name: numpy-cygwin-wheel

.github/workflows/dependency-review.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ jobs:
1717
- name: 'Checkout Repository'
1818
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
1919
- name: 'Dependency Review'
20-
uses: actions/dependency-review-action@0fa40c3c10055986a88de3baa0d6ec17c5a894b3 # v4.2.3
20+
uses: actions/dependency-review-action@0c155c5e8556a497adf53f2c18edabf945ed8e70 # v4.3.2

.github/workflows/emscripten.yml

Lines changed: 36 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,28 @@ on:
55
branches:
66
- main
77
- maintenance/**
8+
# Note: this workflow gets triggered on the same schedule as the
9+
# wheels.yml workflow, with the exception that this workflow runs
10+
# the test suite for the Pyodide wheel too, prior to uploading it.
11+
#
12+
# Run on schedule to upload to Anaconda.org
13+
schedule:
14+
# ┌───────────── minute (0 - 59)
15+
# │ ┌───────────── hour (0 - 23)
16+
# │ │ ┌───────────── day of the month (1 - 31)
17+
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
18+
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
19+
# │ │ │ │ │
20+
- cron: "42 2 * * SUN,WED"
21+
workflow_dispatch:
22+
inputs:
23+
push_wheels:
24+
# Can be 'true' or 'false'. Default is 'false'.
25+
# Warning: this will overwrite existing wheels.
26+
description: >
27+
Push wheels to Anaconda.org if the build succeeds
28+
required: false
29+
default: 'false'
830

931
env:
1032
FORCE_COLOR: 3
@@ -23,7 +45,7 @@ jobs:
2345
# To enable this workflow on a fork, comment out:
2446
if: github.repository == 'numpy/numpy'
2547
env:
26-
PYODIDE_VERSION: 0.25.0
48+
PYODIDE_VERSION: 0.25.1
2749
# PYTHON_VERSION and EMSCRIPTEN_VERSION are determined by PYODIDE_VERSION.
2850
# The appropriate versions can be found in the Pyodide repodata.json
2951
# "info" field, or in Makefile.envs:
@@ -42,7 +64,7 @@ jobs:
4264

4365
- name: Set up Python ${{ env.PYTHON_VERSION }}
4466
id: setup-python
45-
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
67+
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
4668
with:
4769
python-version: ${{ env.PYTHON_VERSION }}
4870

@@ -69,11 +91,6 @@ jobs:
6991
with open(env_file, "a") as myfile:
7092
myfile.write(f"PYODIDE_BUILD_PATH={pyodide_build_path}\n")
7193
72-
- name: Apply patch(es) for pyodide-build installation
73-
run: |
74-
ls -a ${{ env.PYODIDE_BUILD_PATH }}
75-
patch -d "${{ env.PYODIDE_BUILD_PATH }}" -p1 < tools/ci/emscripten/0001-do-not-set-meson-environment-variable-pyodide-gh-4502.patch
76-
7794
- name: Build NumPy for Pyodide
7895
run: |
7996
pyodide build -Cbuild-dir=build -Csetup-args="--cross-file=$PWD/tools/ci/emscripten/emscripten.meson.cross" -Csetup-args="-Dblas=none" -Csetup-args="-Dlapack=none"
@@ -95,3 +112,15 @@ jobs:
95112
source .venv-pyodide/bin/activate
96113
cd ..
97114
pytest --pyargs numpy -m "not slow"
115+
116+
# Push to https://anaconda.org/scientific-python-nightly-wheels/numpy
117+
# WARNING: this job will overwrite any existing WASM wheels.
118+
- name: Push to Anaconda PyPI index
119+
if: >-
120+
(github.repository == 'numpy/numpy') &&
121+
(github.event_name == 'workflow_dispatch' && github.event.inputs.push_wheels == 'true') ||
122+
(github.event_name == 'schedule')
123+
uses: scientific-python/upload-nightly-action@b67d7fcc0396e1128a474d1ab2b48aa94680f9fc # v0.5.0
124+
with:
125+
artifacts_path: dist/
126+
anaconda_nightly_upload_token: ${{ secrets.NUMPY_NIGHTLY_UPLOAD_TOKEN }}

.github/workflows/linux.yml

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ jobs:
3737
with:
3838
submodules: recursive
3939
fetch-depth: 0
40-
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
40+
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
4141
with:
42-
python-version: '3.9'
42+
python-version: '3.10'
4343
- name: Install linter requirements
4444
run:
4545
python -m pip install -r requirements/linter_requirements.txt
@@ -53,14 +53,17 @@ jobs:
5353
runs-on: ubuntu-latest
5454
env:
5555
MESON_ARGS: "-Dallow-noblas=true -Dcpu-baseline=none -Dcpu-dispatch=none"
56+
strategy:
57+
matrix:
58+
version: ["3.10", "3.11", "3.12", "3.13-dev"]
5659
steps:
5760
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
5861
with:
5962
submodules: recursive
6063
fetch-tags: true
61-
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
64+
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
6265
with:
63-
python-version: '3.9'
66+
python-version: ${{ matrix.version }}
6467
- uses: ./.github/meson_actions
6568

6669
pypy:
@@ -72,9 +75,9 @@ jobs:
7275
with:
7376
submodules: recursive
7477
fetch-tags: true
75-
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
78+
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
7679
with:
77-
python-version: 'pypy3.9-v7.3.12'
80+
python-version: 'pypy3.10-v7.3.15'
7881
- name: Setup using scipy-openblas
7982
run: |
8083
python -m pip install -r requirements/ci_requirements.txt
@@ -119,9 +122,9 @@ jobs:
119122
with:
120123
submodules: recursive
121124
fetch-tags: true
122-
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
125+
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
123126
with:
124-
python-version: '3.9'
127+
python-version: '3.10'
125128
- name: Install build and test dependencies from PyPI
126129
run: |
127130
pip install -r requirements/build_requirements.txt
@@ -156,9 +159,9 @@ jobs:
156159
with:
157160
submodules: recursive
158161
fetch-tags: true
159-
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
162+
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
160163
with:
161-
python-version: '3.9'
164+
python-version: '3.10'
162165
- name: Install build and benchmarking dependencies
163166
run: |
164167
sudo apt-get update
@@ -187,7 +190,7 @@ jobs:
187190
with:
188191
submodules: recursive
189192
fetch-tags: true
190-
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
193+
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
191194
with:
192195
python-version: '3.11'
193196
- name: Install gfortran and setup OpenBLAS (sdist build)
@@ -225,11 +228,11 @@ jobs:
225228
uses: actions/checkout@v4
226229
with:
227230
repository: data-apis/array-api-tests
228-
ref: '9afe8c709d81f005c98d383c82ad5e1c2cd8166c' # Latest commit as of 2023-11-24
231+
ref: '3cf8ef654c456d9fd1633d64e67b4470465940e9' # Latest commit as of 2024-04-09
229232
submodules: 'true'
230233
path: 'array-api-tests'
231234
- name: Set up Python
232-
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
235+
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
233236
with:
234237
python-version: '3.11'
235238
- name: Install build and test dependencies from PyPI
@@ -246,8 +249,6 @@ jobs:
246249
PYTHONWARNINGS: 'ignore::UserWarning::,ignore::DeprecationWarning::,ignore::RuntimeWarning::'
247250
run: |
248251
cd ${GITHUB_WORKSPACE}/array-api-tests
249-
# remove once https://github.com/data-apis/array-api-tests/pull/217 is merged
250-
touch pytest.ini
251252
pytest array_api_tests -v -c pytest.ini --ci --max-examples=2 --derandomize --disable-deadline --skips-file ${GITHUB_WORKSPACE}/tools/ci/array-api-skips.txt
252253
253254
custom_checks:
@@ -259,7 +260,7 @@ jobs:
259260
with:
260261
submodules: recursive
261262
fetch-tags: true
262-
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
263+
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
263264
with:
264265
python-version: '3.11'
265266
- name: Install build and test dependencies from PyPI
@@ -281,3 +282,8 @@ jobs:
281282
run: |
282283
# Need the explicit `bash -c` here because `grep` returns exit code 1 for no matches
283284
bash -c "! vulture . --min-confidence 100 --exclude doc/,numpy/distutils/,vendored-meson/ | grep 'unreachable'"
285+
- name: Check usage of install_tag
286+
run: |
287+
rm -rf build-install
288+
./vendored-meson/meson/meson.py install -C build --destdir ../build-install --tags=runtime,python-runtime,devel
289+
python tools/check_installed_files.py $(find ./build-install -path '*/site-packages/numpy') --no-tests

.github/workflows/linux_blas.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
with:
7070
submodules: recursive
7171
fetch-tags: true
72-
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
72+
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
7373
with:
7474
python-version: '3.11'
7575

@@ -196,7 +196,7 @@ jobs:
196196
with:
197197
submodules: recursive
198198
fetch-tags: true
199-
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
199+
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
200200
with:
201201
python-version: '3.11'
202202

@@ -224,7 +224,7 @@ jobs:
224224
with:
225225
submodules: recursive
226226
fetch-tags: true
227-
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
227+
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
228228
with:
229229
python-version: '3.11'
230230

@@ -284,7 +284,7 @@ jobs:
284284
with:
285285
submodules: recursive
286286
fetch-tags: true
287-
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
287+
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
288288
with:
289289
python-version: '3.11'
290290

@@ -347,7 +347,7 @@ jobs:
347347
with:
348348
submodules: recursive
349349
fetch-tags: true
350-
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
350+
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
351351
with:
352352
python-version: '3.11'
353353

@@ -383,7 +383,7 @@ jobs:
383383
with:
384384
submodules: recursive
385385
fetch-tags: true
386-
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
386+
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
387387
with:
388388
python-version: '3.11'
389389

.github/workflows/linux_compiler_sanitizers.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ permissions:
2121
contents: read # to fetch code (actions/checkout)
2222

2323
jobs:
24-
gcc_sanitizers:
24+
clang_sanitizers:
2525
# To enable this workflow on a fork, comment out:
2626
if: github.repository == 'numpy/numpy'
2727
runs-on: ubuntu-latest
@@ -30,11 +30,13 @@ jobs:
3030
with:
3131
submodules: recursive
3232
fetch-tags: true
33-
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
33+
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
3434
with:
3535
python-version: ${{ env.PYTHON_VERSION }}
3636
- name: Install dependencies
3737
run: |
38+
sudo apt update
39+
sudo apt install -y llvm libstdc++-12-dev
3840
pip install -r requirements/build_requirements.txt
3941
pip install -r requirements/ci_requirements.txt
4042
- name: Build
@@ -43,7 +45,7 @@ jobs:
4345
TERM: xterm-256color
4446
PKG_CONFIG_PATH: ${{ github.workspace }}/.openblas
4547
run:
46-
spin build --with-scipy-openblas=32 -- --werror -Db_sanitize=address,undefined
48+
CC=clang CXX=clang++ spin build --with-scipy-openblas=32 -- -Db_sanitize=address,undefined
4749
- name: Test
4850
shell: 'script -q -e -c "bash --noprofile --norc -eo pipefail {0}"'
4951
env:
@@ -52,5 +54,5 @@ jobs:
5254
pip install pytest pytest-xdist hypothesis typing_extensions
5355
ASAN_OPTIONS=detect_leaks=0:symbolize=1:strict_init_order=true:allocator_may_return_null=1:halt_on_error=1 \
5456
UBSAN_OPTIONS=halt_on_error=0 \
55-
LD_PRELOAD=$(gcc --print-file-name=libasan.so) \
57+
LD_PRELOAD=$(clang --print-file-name=libclang_rt.asan-x86_64.so) \
5658
python -m spin test -- -v -s

.github/workflows/linux_simd.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ jobs:
6262
with:
6363
submodules: recursive
6464
fetch-tags: true
65-
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
65+
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
6666
with:
67-
python-version: '3.9'
67+
python-version: '3.10'
6868
- uses: ./.github/meson_actions
6969
name: Build/Test
7070

@@ -79,9 +79,9 @@ jobs:
7979
with:
8080
submodules: recursive
8181
fetch-tags: true
82-
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
82+
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
8383
with:
84-
python-version: '3.9'
84+
python-version: '3.10'
8585

8686
- name: Install GCC/8/9
8787
run: |
@@ -117,7 +117,7 @@ jobs:
117117
- [
118118
"without optimizations",
119119
"-Dallow-noblas=true -Ddisable-optimization=true",
120-
"3.12-dev"
120+
"3.12"
121121
]
122122
- [
123123
"native",
@@ -132,7 +132,7 @@ jobs:
132132
- [
133133
"without avx512/avx2/fma3",
134134
"-Dallow-noblas=true -Dcpu-dispatch=SSSE3,SSE41,POPCNT,SSE42,AVX,F16C",
135-
"3.9"
135+
"3.10"
136136
]
137137

138138
env:
@@ -144,7 +144,7 @@ jobs:
144144
with:
145145
submodules: recursive
146146
fetch-tags: true
147-
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
147+
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
148148
with:
149149
python-version: "${{ matrix.BUILD_PROP[2] }}"
150150
- uses: ./.github/meson_actions
@@ -158,7 +158,7 @@ jobs:
158158
with:
159159
submodules: recursive
160160
fetch-tags: true
161-
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
161+
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
162162
with:
163163
python-version: '3.11'
164164

@@ -212,7 +212,7 @@ jobs:
212212
with:
213213
submodules: recursive
214214
fetch-tags: true
215-
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
215+
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
216216
with:
217217
python-version: '3.11'
218218

0 commit comments

Comments
 (0)