Skip to content

Make sure to reference Dask interface - #166

Merged
hgomersall merged 1 commit into
pyFFTW:masterfrom
jakirkham:fix_dask_docs
Apr 20, 2017
Merged

hgomersall merged 1 commit into
pyFFTW:masterfrom
jakirkham:fix_dask_docs

Conversation

@jakirkham

Copy link
Copy Markdown
Member

Accidentally was referencing part of the NumPy FFT interface again instead of referencing the Dask FFT interface. Updated to reference the appropriate interface.

Accidentally was referencing part of the NumPy FFT interface again
instead of referencing the Dask FFT interface. Updated to reference the
appropriate interface.
@grlee77

grlee77 commented Apr 5, 2017

Copy link
Copy Markdown
Contributor

LGTM.

p.s. there is a warning when building the docs if dask is not installed, but it doesn't seem to stop the build from completing. I think the same would occur for the scipy interfaces if scipy isn't installed, so probably not worth worrying about. clearly we can't document the routines if they aren't present

/Users/lee8rx/src/my_git/pyFFTW/pyfftw/interfaces/dask_fft.rst:4: WARNING: autodoc: failed to import module 'pyfftw.interfaces.dask_fft'; the following exception was raised:
Traceback (most recent call last):
  File "/Users/lee8rx/anaconda/lib/python3.5/site-packages/Sphinx-1.5.1-py3.5.egg/sphinx/ext/autodoc.py", line 547, in import_object
    __import__(self.modname)
  File "/Users/lee8rx/src/my_git/pyFFTW/pyfftw/interfaces/dask_fft.py", line 57, in <module>
    from dask.array.fft import (
ImportError: cannot import name 'fft_wrap'

@jakirkham

Copy link
Copy Markdown
Member Author

Yeah, we decided in PR ( #154 ) to keep Dask as an optional dependency. So the warning is not surprising. As you note, not much we can do about it.

FWIW with ReadTheDocs we make sure to include Dask in PR ( #161 ). So it should be included and documented. In fact, I can find the Dask interface in the docs and it looks correct. Just this listing was incorrect by not referencing it.

Side Note: The Dask interface was designed to follow the SciPy interface pretty closely in terms of being optional. IOW importing pyfftw.interfaces will try to import dask and populate the dask_fft interface. However, if the import of dask doesn't work or the version of dask is too old, then we clean up all traces of dask and the associated dask_fft interface. So importing pyfftw.interfaces will always work, but it may just not include certain interfaces if the required dependencies and versions are missing.

@jakirkham

Copy link
Copy Markdown
Member Author

Thoughts @hgomersall?

@hgomersall

Copy link
Copy Markdown
Collaborator

Looks good. It's not unreasonable to need all the deps to build the docs.

@hgomersall
hgomersall merged commit d813b3c into pyFFTW:master Apr 20, 2017
@jakirkham
jakirkham deleted the fix_dask_docs branch April 20, 2017 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants