Skip to content

Commit

Permalink
Merge branch 'main' into link-single
Browse files Browse the repository at this point in the history
  • Loading branch information
mdhaber authored Feb 7, 2025
2 parents db19b2c + 7a6120b commit 23297ef
Show file tree
Hide file tree
Showing 27 changed files with 396 additions and 108 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
name: Run CircleCI artifacts redirector
steps:
- name: GitHub Action step
uses: larsoner/circleci-artifacts-redirector-action@master
uses: scientific-python/circleci-artifacts-redirector-action@4e13a10d89177f4bfc8007a7064bdbeda848d8d1 # v1.0.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
api-token: ${{ secrets.CIRCLECI_ARTIFACT_REDIRECTOR_TOKEN }}
Expand Down
43 changes: 28 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,47 @@
name: Build Wheel and Release
on:
pull_request:
branches:
- main
push:
tags:
- v*

jobs:
pypi-publish:
name: upload release to PyPI
if: github.repository_owner == 'numpy' && startsWith(github.ref, 'refs/tags/v') && github.actor == 'jarrodmillman' && always()
sdist_wheel:
name: sdist and wheels
runs-on: ubuntu-latest
# Specifying a GitHub environment is optional, but strongly encouraged
environment: release
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0

- uses: actions/setup-python@v5
name: Install Python
- uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
with:
python-version: "3.12"

- name: Build wheels
run: |
git clean -fxd
pip install -U build twine wheel
python -m build --sdist --wheel
- run: twine check --strict dist/*
- uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
name: dist
path: dist

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
pypi-publish:
needs: sdist_wheel
name: upload release to PyPI
if: github.repository_owner == 'numpy' && startsWith(github.ref, 'refs/tags/v') && github.actor == 'jarrodmillman' && always()
runs-on: ubuntu-latest
# Specifying a GitHub environment is optional, but strongly encouraged
environment: release
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: dist
path: dist
- uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
10 changes: 4 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
matrix:
os: [Ubuntu]
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
sphinx-version:
["sphinx==6.0", "sphinx==6.2", "sphinx==7.0", "sphinx>=7.3"]
include:
Expand All @@ -37,14 +37,13 @@ jobs:
- name: Setup environment
run: |
python -m pip install --upgrade pip wheel setuptools
python -m pip install -r requirements/test.txt -r requirements/doc.txt
python -m pip install codecov
python -m pip install ${{ matrix.sphinx-version }}
python -m pip list
- name: Install
run: |
python -m pip install .
python -m pip install .[test,doc]
pip list
- name: Run test suite
Expand Down Expand Up @@ -79,7 +78,7 @@ jobs:
strategy:
matrix:
os: [ubuntu]
python-version: ["3.11", "3.12"]
python-version: ["3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4

Expand All @@ -91,13 +90,12 @@ jobs:
- name: Setup environment
run: |
python -m pip install --upgrade pip wheel setuptools
python -m pip install --pre -r requirements/test.txt -r requirements/doc.txt
python -m pip install codecov
python -m pip list
- name: Install
run: |
python -m pip install .
python -m pip install .[test,doc]
pip list
- name: Run test suite
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ doc/_build
numpydoc/tests/tinybuild/_build
numpydoc/tests/tinybuild/generated
MANIFEST
node_modules
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 2c9f875913ee60ca25ce70243dc24d5b6415598c # frozen: v4.6.0
rev: cef0300fd0fc4d2a87a85fa2093c6b283ea36f4b # frozen: v5.0.0
hooks:
- id: check-added-large-files
- id: check-ast
Expand All @@ -18,14 +18,14 @@ repos:
- id: trailing-whitespace

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

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "f8a3f8c471fb698229face5ed7640a64900b781e" # frozen: v0.4.4
rev: "89c421dff2e1026ba12cdb9ebd731f4a83aa8021" # frozen: v0.8.6
hooks:
- id: ruff
args: ["--fix", "--show-fixes", "--exit-non-zero-on-fix"]
Expand Down
4 changes: 2 additions & 2 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
os: ubuntu-24.04
tools:
python: "3.11"
python: "3.13"
# You can also specify other tool versions:
# nodejs: "19"
# rust: "1.64"
Expand Down
1 change: 0 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ numpydoc -- Numpy's Sphinx extensions

.. image:: https://readthedocs.org/projects/numpydoc/badge/?version=latest
:alt: Documentation Status
:scale: 100%
:target: https://numpydoc.readthedocs.io/en/latest/

.. image:: https://codecov.io/gh/numpy/numpydoc/branch/main/graph/badge.svg
Expand Down
2 changes: 1 addition & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
html_theme = "pydata_sphinx_theme"
html_theme_options = {
"show_prev_next": False,
"navbar_end": ["theme-switcher", "search-field.html", "navbar-icon-links.html"],
"navbar_end": ["theme-switcher", "navbar-icon-links.html"],
"icon_links": [
{
"name": "GitHub",
Expand Down
10 changes: 6 additions & 4 deletions doc/format.rst
Original file line number Diff line number Diff line change
Expand Up @@ -225,11 +225,11 @@ description, they can be combined::
Input arrays, description of `x1`, `x2`.

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

*args : tuple
*args
Additional arguments should be passed as keyword arguments
**kwargs : dict, optional
**kwargs
Extra arguments to `metric`: refer to each metric documentation for a
list of all possible arguments.

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

An **Attributes** section, located below the :ref:`Parameters <params>`
section, may be used to describe non-method attributes of the class::
Expand Down
1 change: 1 addition & 0 deletions doc/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ This extension requires Python 3.9+, sphinx 6+ and is available from:

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

`'numpydoc'` should be added to the ``extensions`` option in your Sphinx
``conf.py``. ``'sphinx.ext.autosummary'`` will automatically be loaded
Expand Down
73 changes: 73 additions & 0 deletions doc/release/notes.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,76 @@
1.8.0
=====

We're happy to announce the release of numpydoc 1.8.0!

Enhancements
------------

- Unify CLIs (`#537 <https://github.com/numpy/numpydoc/pull/537>`_).
- Move "Attributes" and "Methods" below "Parameters" (`#571 <https://github.com/numpy/numpydoc/pull/571>`_).

Bug Fixes
---------

- FIX: coroutines can have a return statement (`#542 <https://github.com/numpy/numpydoc/pull/542>`_).
- Unwrap decorated objects for YD01 validation check (`#541 <https://github.com/numpy/numpydoc/pull/541>`_).
- Fix bug with validation encoding (`#550 <https://github.com/numpy/numpydoc/pull/550>`_).

Documentation
-------------

- Classify development status as Production/Stable (`#548 <https://github.com/numpy/numpydoc/pull/548>`_).
- Add note about TOML regex; fix typo (`#552 <https://github.com/numpy/numpydoc/pull/552>`_).
- DOC: Clarify recommendations regarding use of backticks (`#525 <https://github.com/numpy/numpydoc/pull/525>`_).

Maintenance
-----------

- Fix typo in label-check.yml (`#538 <https://github.com/numpy/numpydoc/pull/538>`_).
- [pre-commit.ci] pre-commit autoupdate (`#539 <https://github.com/numpy/numpydoc/pull/539>`_).
- DEV: Rm xfails from pytest summary (`#540 <https://github.com/numpy/numpydoc/pull/540>`_).
- Drop Python 3.8 support (`#545 <https://github.com/numpy/numpydoc/pull/545>`_).
- Clean up old sphinx cruft (`#549 <https://github.com/numpy/numpydoc/pull/549>`_).
- Test on sphinx 7.3 (`#547 <https://github.com/numpy/numpydoc/pull/547>`_).
- Require GHA update grouping (`#553 <https://github.com/numpy/numpydoc/pull/553>`_).
- Update pre-commit config (`#554 <https://github.com/numpy/numpydoc/pull/554>`_).
- Use ruff for linting and formatting (`#555 <https://github.com/numpy/numpydoc/pull/555>`_).
- Use intersphinx registry to avoid out of date links (`#563 <https://github.com/numpy/numpydoc/pull/563>`_).
- Do not rely on requirements.txt in ci, use .[test,doc] (`#566 <https://github.com/numpy/numpydoc/pull/566>`_).
- CI: update action that got moved org (`#567 <https://github.com/numpy/numpydoc/pull/567>`_).
- Fix navbar for documentation pages (`#569 <https://github.com/numpy/numpydoc/pull/569>`_).
- [pre-commit.ci] pre-commit autoupdate (`#570 <https://github.com/numpy/numpydoc/pull/570>`_).
- docscrape: fixes from SciPy (`#576 <https://github.com/numpy/numpydoc/pull/576>`_).
- MAINT: Remove scale to work around PyPI bug (`#578 <https://github.com/numpy/numpydoc/pull/578>`_).

Contributors
------------

10 authors added to this release (alphabetically):

- Brigitta Sipőcz (`@bsipocz <https://github.com/bsipocz>`_)
- Eric Larson (`@larsoner <https://github.com/larsoner>`_)
- Jarrod Millman (`@jarrodmillman <https://github.com/jarrodmillman>`_)
- Lucas Colley (`@lucascolley <https://github.com/lucascolley>`_)
- M Bussonnier (`@Carreau <https://github.com/Carreau>`_)
- Matt Haberland (`@mdhaber <https://github.com/mdhaber>`_)
- Melissa Weber Mendonça (`@melissawm <https://github.com/melissawm>`_)
- Ross Barnowski (`@rossbar <https://github.com/rossbar>`_)
- Stefanie Molin (`@stefmolin <https://github.com/stefmolin>`_)
- Thomas A Caswell (`@tacaswell <https://github.com/tacaswell>`_)

7 reviewers added to this release (alphabetically):

- Eric Larson (`@larsoner <https://github.com/larsoner>`_)
- Jarrod Millman (`@jarrodmillman <https://github.com/jarrodmillman>`_)
- M Bussonnier (`@Carreau <https://github.com/Carreau>`_)
- Matt Haberland (`@mdhaber <https://github.com/mdhaber>`_)
- Ross Barnowski (`@rossbar <https://github.com/rossbar>`_)
- Stefan van der Walt (`@stefanv <https://github.com/stefanv>`_)
- Stefanie Molin (`@stefmolin <https://github.com/stefmolin>`_)

_These lists are automatically generated, and may not be complete or may contain duplicates._

1.7.0
=====

Expand Down
3 changes: 3 additions & 0 deletions doc/validation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,9 @@ inline comments:
def __init__(self): # numpydoc ignore=GL08
pass
Note that a properly formatted :ref:`class <classdoc>` docstring
silences ``G08`` for an ``__init__`` constructor without a docstring.

This is supported by the :ref:`CLI <validation_via_cli>`,
:ref:`pre-commit hook <pre_commit_hook>`, and
:ref:`Sphinx extension <validation_during_sphinx_build>`.
Expand Down
4 changes: 2 additions & 2 deletions numpydoc/__main__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
Implementing `python -m numpydoc` functionality.
"""
Implementing `python -m numpydoc` functionality
""" # '.' omitted at end of docstring for testing purposes!

from .cli import main

Expand Down
2 changes: 1 addition & 1 deletion numpydoc/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.8.0rc0.dev0"
__version__ = "1.9.0rc0.dev0"
Loading

0 comments on commit 23297ef

Please sign in to comment.