Skip to content

Commit 195b3ab

Browse files
authored
Merge branch 'main' into DOC/21351/np.char
2 parents e7e3d58 + 6f63230 commit 195b3ab

File tree

282 files changed

+5201
-2931
lines changed

Some content is hidden

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

282 files changed

+5201
-2931
lines changed

.circleci/config.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -54,29 +54,22 @@ jobs:
5454
command: |
5555
python3.11 -m venv venv
5656
. venv/bin/activate
57-
pip install --progress-bar=off -r requirements/test_requirements.txt
57+
pip install --progress-bar=off -r requirements/test_requirements.txt \
58+
-r requirements/build_requirements.txt \
59+
-r requirements/ci_requirements.txt
5860
# get newer, pre-release versions of critical packages
59-
pip install --progress-bar=off --pre --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple -r requirements/doc_requirements.txt
61+
pip install --progress-bar=off --pre -r requirements/doc_requirements.txt
6062
# then install numpy HEAD, which will override the version installed above
61-
pip install . --config-settings=setup-args="-Dallow-noblas=true"
62-
63-
- run:
64-
name: create release notes
65-
command: |
66-
. venv/bin/activate
67-
VERSION=$(pip show numpy | grep Version: | cut -d ' ' -f 2 | cut -c 1-5)
68-
towncrier build --version $VERSION --yes
69-
./tools/ci/test_all_newsfragments_used.py
63+
spin build --with-scipy-openblas=64
7064
7165
- run:
7266
name: build devdocs w/ref warnings
7367
command: |
7468
. venv/bin/activate
75-
cd doc
7669
# Don't use -q, show warning summary"
77-
SPHINXOPTS="-W -n" make -e html
78-
if [[ $(find build/html -type f | wc -l) -lt 1000 ]]; then
79-
echo "doc build failed: build/html is empty"
70+
SPHINXOPTS="-W -n" spin docs
71+
if [[ $(find doc/build/html -type f | wc -l) -lt 1000 ]]; then
72+
echo "doc build failed: doc/build/html is empty"
8073
exit -1
8174
fi
8275
@@ -95,9 +88,16 @@ jobs:
9588
# destination: neps
9689

9790
- run:
98-
name: run refguide-check
91+
name: check doctests
9992
command: |
10093
. venv/bin/activate
94+
spin check-docs -v
95+
spin check-tutorials -v
96+
# Currently, this does two checks not done by check-docs:
97+
# - validates ReST blocks (via validate_rst_syntax)
98+
# - checks that all of a module's `__all__` is reflected in the
99+
# module-level docstring autosummary
100+
echo calling python tools/refguide_check.py -v
101101
python tools/refguide_check.py -v
102102
103103
- persist_to_workspace:

.editorconfig

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,21 @@ indent_size = 4
66
indent_style = space
77
max_line_length = 80
88
trim_trailing_whitespace = true
9+
10+
[*.{py,pyi,pxd}]
11+
# https://peps.python.org/pep-0008/
12+
charset = utf-8
13+
end_of_line = lf
14+
indent_size = 4
15+
indent_style = space
16+
insert_final_newline = true
17+
trim_trailing_whitespace = true
18+
19+
[*.py]
20+
# Keep in sync with `tools/lint_diff.ini` and `tools/linter.py`
21+
# https://pycodestyle.pycqa.org/en/latest/intro.html#configuration
22+
max_line_length = 88
23+
24+
[*.pyi]
25+
# https://typing.readthedocs.io/en/latest/guides/writing_stubs.html#style-guide
26+
max_line_length = 130

.github/workflows/codeql.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545

4646
# Initializes the CodeQL tools for scanning.
4747
- name: Initialize CodeQL
48-
uses: github/codeql-action/init@4dd16135b69a43b6c8efb853346f8437d92d3c93 # v3.26.6
48+
uses: github/codeql-action/init@c36620d31ac7c881962c3d9dd939c40ec9434f2b # v3.26.12
4949
with:
5050
languages: ${{ matrix.language }}
5151
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -55,7 +55,7 @@ jobs:
5555
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
5656
# If this step fails, then you should remove it and run the build manually (see below)
5757
- name: Autobuild
58-
uses: github/codeql-action/autobuild@4dd16135b69a43b6c8efb853346f8437d92d3c93 # v3.26.6
58+
uses: github/codeql-action/autobuild@c36620d31ac7c881962c3d9dd939c40ec9434f2b # v3.26.12
5959

6060
# ℹ️ Command-line programs to run using the OS shell.
6161
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -68,6 +68,6 @@ jobs:
6868
# ./location_of_script_within_repo/buildscript.sh
6969

7070
- name: Perform CodeQL Analysis
71-
uses: github/codeql-action/analyze@4dd16135b69a43b6c8efb853346f8437d92d3c93 # v3.26.6
71+
uses: github/codeql-action/analyze@c36620d31ac7c881962c3d9dd939c40ec9434f2b # v3.26.12
7272
with:
7373
category: "/language:${{matrix.language}}"

.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@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
65+
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
6666
if: failure()
6767
with:
6868
name: numpy-cygwin-wheel

.github/workflows/emscripten.yml

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ concurrency:
3232
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
3333
cancel-in-progress: true
3434

35-
permissions:
36-
contents: read # to fetch code (actions/checkout)
3735

3836
jobs:
3937
build-wasm-emscripten:
38+
permissions:
39+
contents: read # to fetch code (actions/checkout)
4040
name: Build NumPy distribution for Pyodide
4141
runs-on: ubuntu-22.04
4242
# To enable this workflow on a fork, comment out:
@@ -48,24 +48,37 @@ jobs:
4848
submodules: recursive
4949
fetch-tags: true
5050

51-
- uses: pypa/cibuildwheel@bd033a44476646b606efccdd5eed92d5ea1d77ad # v2.20.0
51+
- uses: pypa/cibuildwheel@7940a4c0e76eb2030e473a5f864f291f63ee879b # v2.21.3
5252
env:
5353
CIBW_PLATFORM: pyodide
5454

5555
- name: Upload wheel artifact(s)
56-
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
56+
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
5757
with:
5858
name: cp312-pyodide_wasm32
5959
path: ./wheelhouse/*.whl
60+
if-no-files-found: error
61+
62+
# Push to https://anaconda.org/scientific-python-nightly-wheels/numpy
63+
# WARNING: this job will overwrite any existing WASM wheels.
64+
upload-wheels:
65+
name: Upload NumPy WASM wheels to Anaconda.org
66+
runs-on: ubuntu-22.04
67+
permissions: {}
68+
needs: [build-wasm-emscripten]
69+
if: >-
70+
(github.repository == 'numpy/numpy') &&
71+
(github.event_name == 'workflow_dispatch' && github.event.inputs.push_wheels == 'true') ||
72+
(github.event_name == 'schedule')
73+
steps:
74+
- name: Download wheel artifact(s)
75+
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
76+
with:
77+
path: wheelhouse/
78+
merge-multiple: true
6079

61-
# Push to https://anaconda.org/scientific-python-nightly-wheels/numpy
62-
# WARNING: this job will overwrite any existing WASM wheels.
6380
- name: Push to Anaconda PyPI index
64-
if: >-
65-
(github.repository == 'numpy/numpy') &&
66-
(github.event_name == 'workflow_dispatch' && github.event.inputs.push_wheels == 'true') ||
67-
(github.event_name == 'schedule')
68-
uses: scientific-python/upload-nightly-action@b67d7fcc0396e1128a474d1ab2b48aa94680f9fc # v0.5.0
81+
uses: scientific-python/upload-nightly-action@82396a2ed4269ba06c6b2988bb4fd568ef3c3d6b # v0.6.1
6982
with:
7083
artifacts_path: wheelhouse/
7184
anaconda_nightly_upload_token: ${{ secrets.NUMPY_NIGHTLY_UPLOAD_TOKEN }}

.github/workflows/linux.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ jobs:
274274
pip install vulture
275275
- name: Build and install NumPy
276276
run: |
277-
# Install using the fastests way to build (no BLAS, no SIMD)
277+
# Install using the fastest way to build (no BLAS, no SIMD)
278278
spin build -j2 -- -Dallow-noblas=true -Dcpu-baseline=none -Dcpu-dispatch=none
279279
- name: Check build-internal dependencies
280280
run: |
@@ -302,7 +302,7 @@ jobs:
302302
submodules: recursive
303303
fetch-tags: true
304304
# TODO: replace with setup-python when there is support
305-
- uses: deadsnakes/action@6c8b9b82fe0b4344f4b98f2775fcc395df45e494 # v3.1.0
305+
- uses: deadsnakes/action@e640ac8743173a67cca4d7d77cd837e514bf98e8 # v3.2.0
306306
with:
307307
python-version: '3.13-dev'
308308
nogil: true

.github/workflows/linux_qemu.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ jobs:
108108
sudo apt install -y ninja-build gcc-${TOOLCHAIN_NAME} g++-${TOOLCHAIN_NAME} gfortran-${TOOLCHAIN_NAME}
109109
110110
- name: Cache docker container
111-
uses: actions/cache@v4.0.2
111+
uses: actions/cache@v4.1.1
112112
id: container-cache
113113
with:
114114
path: ~/docker_${{ matrix.BUILD_PROP[1] }}

.github/workflows/linux_simd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ name: Linux SIMD tests
1717
#
1818
# - native:
1919
# Tests against the host CPU features set as the baseline without enabling any runtime dispatched features.
20-
# Intended to assess the entire NumPy codebase against host flags, even for code sections lacking handwritten SIMD intrincis.
20+
# Intended to assess the entire NumPy codebase against host flags, even for code sections lacking handwritten SIMD intrinsics.
2121
#
2222
# - without_avx512/avx2/fma3:
2323
# Uses runtime SIMD dispatching but disables AVX2, FMA3, and AVX512.

.github/workflows/macos.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
echo "today=$(/bin/date -u '+%Y%m%d')" >> $GITHUB_OUTPUT
4545
4646
- name: Setup compiler cache
47-
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
47+
uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1
4848
id: cache-ccache
4949
with:
5050
path: ${{ steps.prep-ccache.outputs.dir }}
@@ -68,7 +68,7 @@ jobs:
6868
# ensure we re-solve once a day (since we don't lock versions). Could be
6969
# replaced by a conda-lock based approach in the future.
7070
- name: Cache conda environment
71-
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
71+
uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1
7272
env:
7373
# Increase this value to reset cache if environment.yml has not changed
7474
CACHE_NUMBER: 1

.github/workflows/mypy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ jobs:
4747
matrix:
4848
os_python:
4949
- [ubuntu-latest, '3.12']
50-
- [windows-2019, '3.11']
51-
- [macos-12, '3.10']
50+
- [windows-latest, '3.11']
51+
- [macos-latest, '3.10']
5252
steps:
5353
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
5454
with:

0 commit comments

Comments
 (0)