Skip to content

Commit a88d014

Browse files
authored
MAINT: Bump scipy-doctest to 1.8 (#29085)
* MAINT: check-docs: require scipy-doctest >= 1.8.0 See for the discussion https://discuss.scientific-python.org/t/scipy-doctest-select-only-doctests-or-both-doctests-and-unit-tests/1950 [docs only] * CI: bump scipy-doctest version on CI [skip azp] [skip actions] [skip cirrus] * MAINT: tweak doctests to not fail
1 parent 12a0328 commit a88d014

File tree

5 files changed

+7
-4
lines changed

5 files changed

+7
-4
lines changed

.github/workflows/linux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ jobs:
271271
# - name: Check docstests
272272
# shell: 'script -q -e -c "bash --noprofile --norc -eo pipefail {0}"'
273273
# run: |
274-
# pip install scipy-doctest==1.6.0 hypothesis==6.104.1 matplotlib scipy pytz pandas
274+
# pip install scipy-doctest>=1.8.0 hypothesis==6.104.1 matplotlib scipy pytz pandas
275275
# spin check-docs -v
276276
# spin check-tutorials -v
277277

.spin/cmds.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,13 +196,16 @@ def check_docs(*, parent_callback, pytest_args, **kwargs):
196196
import scipy_doctest # noqa: F401
197197
except ModuleNotFoundError as e:
198198
raise ModuleNotFoundError("scipy-doctest not installed") from e
199+
if scipy_doctest.__version__ < '1.8.0':
200+
raise ModuleNotFoundError("please update scipy_doctests to >= 1.8.0")
199201

200202
if (not pytest_args):
201203
pytest_args = ('--pyargs', 'numpy')
202204

203205
# turn doctesting on:
204206
doctest_args = (
205207
'--doctest-modules',
208+
'--doctest-only-doctests=true',
206209
'--doctest-collect=api'
207210
)
208211

numpy/_core/_add_newdocs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5944,7 +5944,7 @@
59445944
>>> import numpy as np
59455945
>>> dt = np.dtype([('name', np.str_, 16), ('grades', np.float64, (2,))])
59465946
>>> print(dt.fields)
5947-
{'name': (dtype('|S16'), 0), 'grades': (dtype(('float64',(2,))), 16)}
5947+
{'name': (dtype('<U16'), 0), 'grades': (dtype(('<f8', (2,))), 64)}
59485948
59495949
"""))
59505950

numpy/lib/introspect.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def opt_func_info(func_name=None, signature=None):
3434
... func_name="add|abs", signature="float64|complex64"
3535
... )
3636
>>> import json
37-
>>> print(json.dumps(dict, indent=2))
37+
>>> print(json.dumps(dict, indent=2)) # may vary (architecture)
3838
{
3939
"absolute": {
4040
"dd": {

requirements/doc_requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ toml
1919

2020

2121
# for doctests, also needs pytz which is in test_requirements
22-
scipy-doctest==1.6.0
22+
scipy-doctest>=1.8.0
2323

2424
# interactive documentation utilities
2525
# see https://github.com/jupyterlite/pyodide-kernel#compatibility

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy