bskinn/sphobjinv

Problem with NumPy documentation (suggest fails)

oscargus opened this issue · 1 comments

Brief description

(base) lnx00073 [/local/data1/matplotlib/doc] (mlabdocumentation)> sphobjinv su -u https://numpy.org/doc/stable/ fft
 
No inventory at provided URL.
Attempting "https://numpy.org/doc/stable/objects.inv" ...
Remote inventory found.
 
No results found.

but

(base) lnx00073 [/local/data1/matplotlib/doc] (mlabdocumentation)> sphobjinv su -u https://numpy.org/doc/stable/ numpy | grep fft
 
No inventory at provided URL.
Attempting "https://numpy.org/doc/stable/objects.inv" ...
Remote inventory found.
 
y
 
:py:module:`numpy.fft`
:py:function:`numpy.fft.fft`
:py:function:`numpy.fft.fft2`
:py:function:`numpy.fft.fftfreq`
:py:function:`numpy.fft.fftn`
:py:function:`numpy.fft.fftshift`
:py:function:`numpy.fft.hfft`
:py:function:`numpy.fft.ifft`
:py:function:`numpy.fft.ifft2`
:py:function:`numpy.fft.ifftn`
:py:function:`numpy.fft.ifftshift`
:py:function:`numpy.fft.ihfft`
:py:function:`numpy.fft.irfft`
:py:function:`numpy.fft.irfft2`
:py:function:`numpy.fft.irfftn`
:py:function:`numpy.fft.rfft`
:py:function:`numpy.fft.rfft2`
:py:function:`numpy.fft.rfftfreq`
:py:function:`numpy.fft.rfftn`

Expected behavior

Some hits.

Actual behavior

No hits.

To reproduce

See above.

Attachments

System information

  • Device:
  • OS: CentOS 7

Python environment

Python

Python 3.8.13 | packaged by conda-forge | (default, Mar 25 2022, 06:04:10)
[GCC 10.3.0]

Libraries

Additional information

sphobjinv v2.2.2

I opened numpy/numpy#21294 before greping. As stated there, it seems like sphinx cannot find it either, but still investigating if I was just messing up.

sphobjinv suggest is showing no results because all of the objects in the inventory yield a match score lower than the default threshold of '75'.

If you lower that threshold, results do appear.

>sphobjinv su -u https://numpy.org/doc/stable/ fft -t 60

No inventory at provided URL.
Attempting "https://numpy.org/doc/stable/objects.inv" ...
Remote inventory found.

Display all 39 results (Y/N)? y
:py:module:`numpy.fft`
:py:function:`numpy.fft.fft`
:py:function:`numpy.fft.fft2`
:py:function:`numpy.fft.fftfreq`
:py:function:`numpy.fft.fftn`
:py:function:`numpy.fft.fftshift`
:py:function:`numpy.fft.hfft`
:py:function:`numpy.fft.ifft`
:py:function:`numpy.fft.ifft2`
:py:function:`numpy.fft.ifftn`
:py:function:`numpy.fft.ifftshift`
:py:function:`numpy.fft.ihfft`
:py:function:`numpy.fft.irfft`
:py:function:`numpy.fft.irfft2`
:py:function:`numpy.fft.irfftn`
:py:function:`numpy.fft.rfft`
:py:function:`numpy.fft.rfft2`
:py:function:`numpy.fft.rfftfreq`
:py:function:`numpy.fft.rfftn`
:std:doc:`reference/generated/numpy.fft.fft`
:std:doc:`reference/generated/numpy.fft.fft2`
:std:doc:`reference/generated/numpy.fft.fftfreq`
:std:doc:`reference/generated/numpy.fft.fftn`
:std:doc:`reference/generated/numpy.fft.fftshift`
:std:doc:`reference/generated/numpy.fft.hfft`
:std:doc:`reference/generated/numpy.fft.ifft`
:std:doc:`reference/generated/numpy.fft.ifft2`
:std:doc:`reference/generated/numpy.fft.ifftn`
:std:doc:`reference/generated/numpy.fft.ifftshift`
:std:doc:`reference/generated/numpy.fft.ihfft`
:std:doc:`reference/generated/numpy.fft.irfft`
:std:doc:`reference/generated/numpy.fft.irfft2`
:std:doc:`reference/generated/numpy.fft.irfftn`
:std:doc:`reference/generated/numpy.fft.rfft`
:std:doc:`reference/generated/numpy.fft.rfft2`
:std:doc:`reference/generated/numpy.fft.rfftfreq`
:std:doc:`reference/generated/numpy.fft.rfftn`
:std:doc:`reference/routines.fft`
:std:label:`routines.fft`

I have #145 in mind as a better default (or at least alternative) suggest behavior, that would avoid this sort of thing.

If nothing else, though, in the short term I should really improve the message emitted by the CLI. "No results found." is not accurate. It should really provide a short report like:

12373 results found.
0 results found with match score exceeding threshold of 75.

I'll create an issue for that UI change shortly.