Fix eps_l1b reader Delayed usage causing docs failures #2700
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This was discussed on slack and first seen failing in #2699. Readthedocs builds were failing with a new version of dask. Sphinx apidocs were trying to analyze if a method was a staticmethod and failing with:
I was able to reproduce it locally with the newest dask and discovered that it was the
eps_l1b.py
reader. This reader declared a regular class method as a Delayed object. This is generally considered bad practice as it makes the Delayed object non-serializable in distributed environments/workflows. Technically making it a staticmethod should have fixed it but when I tried it locally I couldn't make it work. I instead decided to make it a global function as there was no real reason to tie it to the class. This seems to fix it.I then checked trollimage which does use delayed staticmethods and it doesn't fail, but that's because the staticmethod isn't made delayed until it is called. For example
res = dask.delayed(self._some_static_method)(a, b, c)
. This type of calling seems fine.AUTHORS.md
if not there already