Skip to content

Commit 23297ef

Browse files
authored
Merge branch 'main' into link-single
2 parents db19b2c + 7a6120b commit 23297ef

27 files changed

+396
-108
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ jobs:
55
name: Run CircleCI artifacts redirector
66
steps:
77
- name: GitHub Action step
8-
uses: larsoner/circleci-artifacts-redirector-action@master
8+
uses: scientific-python/circleci-artifacts-redirector-action@4e13a10d89177f4bfc8007a7064bdbeda848d8d1 # v1.0.0
99
with:
1010
repo-token: ${{ secrets.GITHUB_TOKEN }}
1111
api-token: ${{ secrets.CIRCLECI_ARTIFACT_REDIRECTOR_TOKEN }}

.github/workflows/release.yml

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,47 @@
11
name: Build Wheel and Release
22
on:
3+
pull_request:
4+
branches:
5+
- main
36
push:
47
tags:
58
- v*
69

710
jobs:
8-
pypi-publish:
9-
name: upload release to PyPI
10-
if: github.repository_owner == 'numpy' && startsWith(github.ref, 'refs/tags/v') && github.actor == 'jarrodmillman' && always()
11+
sdist_wheel:
12+
name: sdist and wheels
1113
runs-on: ubuntu-latest
12-
# Specifying a GitHub environment is optional, but strongly encouraged
13-
environment: release
14-
permissions:
15-
# IMPORTANT: this permission is mandatory for trusted publishing
16-
id-token: write
1714
steps:
18-
- uses: actions/checkout@v4
15+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
1916
with:
2017
fetch-depth: 0
21-
22-
- uses: actions/setup-python@v5
23-
name: Install Python
18+
- uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
2419
with:
2520
python-version: "3.12"
26-
2721
- name: Build wheels
2822
run: |
2923
git clean -fxd
3024
pip install -U build twine wheel
3125
python -m build --sdist --wheel
26+
- run: twine check --strict dist/*
27+
- uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
28+
with:
29+
name: dist
30+
path: dist
3231

33-
- name: Publish package distributions to PyPI
34-
uses: pypa/gh-action-pypi-publish@release/v1
32+
pypi-publish:
33+
needs: sdist_wheel
34+
name: upload release to PyPI
35+
if: github.repository_owner == 'numpy' && startsWith(github.ref, 'refs/tags/v') && github.actor == 'jarrodmillman' && always()
36+
runs-on: ubuntu-latest
37+
# Specifying a GitHub environment is optional, but strongly encouraged
38+
environment: release
39+
permissions:
40+
# IMPORTANT: this permission is mandatory for trusted publishing
41+
id-token: write
42+
steps:
43+
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
44+
with:
45+
name: dist
46+
path: dist
47+
- uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4

.github/workflows/test.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
strategy:
1717
matrix:
1818
os: [Ubuntu]
19-
python-version: ["3.9", "3.10", "3.11", "3.12"]
19+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
2020
sphinx-version:
2121
["sphinx==6.0", "sphinx==6.2", "sphinx==7.0", "sphinx>=7.3"]
2222
include:
@@ -37,14 +37,13 @@ jobs:
3737
- name: Setup environment
3838
run: |
3939
python -m pip install --upgrade pip wheel setuptools
40-
python -m pip install -r requirements/test.txt -r requirements/doc.txt
4140
python -m pip install codecov
4241
python -m pip install ${{ matrix.sphinx-version }}
4342
python -m pip list
4443
4544
- name: Install
4645
run: |
47-
python -m pip install .
46+
python -m pip install .[test,doc]
4847
pip list
4948
5049
- name: Run test suite
@@ -79,7 +78,7 @@ jobs:
7978
strategy:
8079
matrix:
8180
os: [ubuntu]
82-
python-version: ["3.11", "3.12"]
81+
python-version: ["3.11", "3.12", "3.13"]
8382
steps:
8483
- uses: actions/checkout@v4
8584

@@ -91,13 +90,12 @@ jobs:
9190
- name: Setup environment
9291
run: |
9392
python -m pip install --upgrade pip wheel setuptools
94-
python -m pip install --pre -r requirements/test.txt -r requirements/doc.txt
9593
python -m pip install codecov
9694
python -m pip list
9795
9896
- name: Install
9997
run: |
100-
python -m pip install .
98+
python -m pip install .[test,doc]
10199
pip list
102100
103101
- name: Run test suite

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ doc/_build
1616
numpydoc/tests/tinybuild/_build
1717
numpydoc/tests/tinybuild/generated
1818
MANIFEST
19+
node_modules

.pre-commit-config.yaml

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

44
repos:
55
- repo: https://github.com/pre-commit/pre-commit-hooks
6-
rev: 2c9f875913ee60ca25ce70243dc24d5b6415598c # frozen: v4.6.0
6+
rev: cef0300fd0fc4d2a87a85fa2093c6b283ea36f4b # frozen: v5.0.0
77
hooks:
88
- id: check-added-large-files
99
- id: check-ast
@@ -18,14 +18,14 @@ repos:
1818
- id: trailing-whitespace
1919

2020
- repo: https://github.com/pre-commit/mirrors-prettier
21-
rev: ffb6a759a979008c0e6dff86e39f4745a2d9eac4 # frozen: v3.1.0
21+
rev: f12edd9c7be1c20cfa42420fd0e6df71e42b51ea # frozen: v4.0.0-alpha.8
2222
hooks:
2323
- id: prettier
2424
types_or: [yaml, toml, markdown, css, scss, javascript, json]
2525
args: [--prose-wrap=preserve]
2626

2727
- repo: https://github.com/astral-sh/ruff-pre-commit
28-
rev: "f8a3f8c471fb698229face5ed7640a64900b781e" # frozen: v0.4.4
28+
rev: "89c421dff2e1026ba12cdb9ebd731f4a83aa8021" # frozen: v0.8.6
2929
hooks:
3030
- id: ruff
3131
args: ["--fix", "--show-fixes", "--exit-non-zero-on-fix"]

.readthedocs.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ version: 2
66

77
# Set the OS, Python version and other tools you might need
88
build:
9-
os: ubuntu-22.04
9+
os: ubuntu-24.04
1010
tools:
11-
python: "3.11"
11+
python: "3.13"
1212
# You can also specify other tool versions:
1313
# nodejs: "19"
1414
# rust: "1.64"

README.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ numpydoc -- Numpy's Sphinx extensions
44

55
.. image:: https://readthedocs.org/projects/numpydoc/badge/?version=latest
66
:alt: Documentation Status
7-
:scale: 100%
87
:target: https://numpydoc.readthedocs.io/en/latest/
98

109
.. image:: https://codecov.io/gh/numpy/numpydoc/branch/main/graph/badge.svg

doc/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
html_theme = "pydata_sphinx_theme"
8383
html_theme_options = {
8484
"show_prev_next": False,
85-
"navbar_end": ["theme-switcher", "search-field.html", "navbar-icon-links.html"],
85+
"navbar_end": ["theme-switcher", "navbar-icon-links.html"],
8686
"icon_links": [
8787
{
8888
"name": "GitHub",

doc/format.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,11 +225,11 @@ description, they can be combined::
225225
Input arrays, description of `x1`, `x2`.
226226

227227
When documenting variable length positional, or keyword arguments, leave the
228-
leading star(s) in front of the name::
228+
leading star(s) in front of the name and do not specify a type::
229229

230-
*args : tuple
230+
*args
231231
Additional arguments should be passed as keyword arguments
232-
**kwargs : dict, optional
232+
**kwargs
233233
Extra arguments to `metric`: refer to each metric documentation for a
234234
list of all possible arguments.
235235

@@ -557,7 +557,9 @@ Class docstring
557557
Use the same sections as outlined above (all except :ref:`Returns <returns>`
558558
are applicable). The constructor (``__init__``) should also be documented
559559
here, the :ref:`Parameters <params>` section of the docstring details the
560-
constructor's parameters.
560+
constructor's parameters. While repetition is unnecessary, a docstring for
561+
the class constructor (``__init__``) can, optionally, be added to provide
562+
detailed initialization documentation.
561563

562564
An **Attributes** section, located below the :ref:`Parameters <params>`
563565
section, may be used to describe non-method attributes of the class::

doc/install.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ This extension requires Python 3.9+, sphinx 6+ and is available from:
99

1010
* `numpydoc on PyPI <http://pypi.python.org/pypi/numpydoc>`_
1111
* `numpydoc on GitHub <https://github.com/numpy/numpydoc/>`_
12+
* `numpydoc on conda-forge <https://prefix.dev/channels/conda-forge/packages/numpydoc>`_
1213

1314
`'numpydoc'` should be added to the ``extensions`` option in your Sphinx
1415
``conf.py``. ``'sphinx.ext.autosummary'`` will automatically be loaded

0 commit comments

Comments
 (0)