Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix API doc #46

Merged
merged 4 commits into from
Jan 28, 2021
Merged

Fix API doc #46

merged 4 commits into from
Jan 28, 2021

Conversation

davidbrochart
Copy link
Contributor

@davidbrochart davidbrochart commented Jan 23, 2021

Fixes #38

See https://pangeo-forge--46.org.readthedocs.build/en/46/api.html

There are other errors:

WARNING: autodoc: failed to import class 'recipe.BaseRecipe' from module 'pangeo_forge'; the following exception was raised:
cannot import name 'MultiStagePipeline' from 'rechunker.types' (/home/david/mambaforge/envs/pangeo-forge-dev/lib/python3.9/site-packages/rechunker/types.py) 
WARNING: autodoc: failed to import class 'recipe.NetCDFtoZarrSequentialRecipe' from module 'pangeo_forge'; the following exception was raised:
cannot import name 'MultiStagePipeline' from 'rechunker.types' (/home/david/mambaforge/envs/pangeo-forge-dev/lib/python3.9/site-packages/rechunker/types.py) 
WARNING: autodoc: failed to import class 'executors.PythonPipelineExecutor' from module 'pangeo_forge'; the following exception was raised:
cannot import name 'DaskPipelineExecutor' from 'rechunker.executors' (/home/david/mambaforge/envs/pangeo-forge-dev/lib/python3.9/site-packages/rechunker/executors/__init__.py)                                                                                                                                           
WARNING: autodoc: failed to import class 'executors.DaskPipelineExecutor' from module 'pangeo_forge'; the following exception was raised:
cannot import name 'DaskPipelineExecutor' from 'rechunker.executors' (/home/david/mambaforge/envs/pangeo-forge-dev/lib/python3.9/site-packages/rechunker/executors/__init__.py)                                                                                                                                           
WARNING: autodoc: failed to import class 'executors.PrefectPipelineExecutor' from module 'pangeo_forge'; the following exception was raised:
cannot import name 'DaskPipelineExecutor' from 'rechunker.executors' (/home/david/mambaforge/envs/pangeo-forge-dev/lib/python3.9/site-packages/rechunker/executors/__init__.py)

Indeed, it looks like MultiStagePipeline and DaskPipelineExecutor don't exist in rechunker.

@charlesbluca
Copy link
Member

Is is possible to circumvent the sys.path trick by using pip install -e to install the package from the cloned repo and then import it in conf.py? This is seemingly what xarray does for their RTD builds, although they specify their env with a YAML file instead of requirements.txt so not exactly sure how it would translate:

name: xarray-docs
channels:
    ...
dependencies:
    ...
  - pip
  - pip:
      - scanpydoc
      # relative to this file. Needs to be editable to be accepted.
      - -e ../..

@davidbrochart
Copy link
Contributor Author

Let's try, thanks for hint!

@charlesbluca
Copy link
Member

charlesbluca commented Jan 23, 2021

Glad to see it worked!

For the other errors, I assume that we need to change PythonPipelineExecutor, ... to PythonExecutor, ... to match up with the executors in rechunker, although I'm unsure about the MultiStagePipeline - @rabernat, is this an addition you made to rechunker that isn't yet published?

@rabernat
Copy link
Contributor

😁 Thanks so much @davidbrochart!

is this an addition you made to rechunker that isn't yet published?

Bingo. We are pointing at this PR (pangeo-data/rechunker#77), which is still unmerged.

I have this in the CI, so presumably we need to do something similar in the docs:
https://github.com/pangeo-forge/pangeo-forge/blob/f9b698a35a62ab169bce546b15fef9722c70cd90/ci/py3.8.yml#L31

Hope to merge that PR this week. Just needs a bit of real-world testing ferst.

@rabernat rabernat added the documentation Improvements or additions to documentation label Jan 24, 2021
@pangeo-forge pangeo-forge deleted a comment from rabernat Jan 27, 2021
docs/requirements.txt Outdated Show resolved Hide resolved
Co-authored-by: Charles Blackmon-Luca <charlesbluca@gmail.com>
@rabernat
Copy link
Contributor

Executor docs still not working

WARNING: autodoc: failed to import class 'executors.PythonPipelineExecutor' from module 'pangeo_forge'; the following exception was raised:
No module named 'prefect'
WARNING: autodoc: failed to import class 'executors.DaskPipelineExecutor' from module 'pangeo_forge'; the following exception was raised:
No module named 'prefect'
WARNING: autodoc: failed to import class 'executors.PrefectPipelineExecutor' from module 'pangeo_forge'; the following exception was raised:
No module named 'prefect'

I guess we need prefect in the doc env.

@rabernat
Copy link
Contributor

🎉

@rabernat rabernat merged commit 46b465c into pangeo-forge:master Jan 28, 2021
@davidbrochart davidbrochart deleted the fix_doc branch January 28, 2021 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

API documentation not working on RTD
3 participants