sanghyukmoon / grid_dendro

MIT License
1 stars 1 forks source link

Github workflow does not render API documentation #2

Closed sanghyukmoon closed 1 year ago

sanghyukmoon commented 1 year ago

When I build and deploy the jupyter book manually by

$ PYTHONPATH=./ jupyter-book build docs/
$ ghp-import -n -p -f docs/_build/html

then API documentation is rendered without any problem. For example, see https://sanghyukmoon.github.io/grid_dendro/dendrogram.html#

However, when github action does that for me, the API documentation is not rendered. For example, see the jupyter book in Chang-Goo's fork https://changgoo.github.io/grid_dendro/dendrogram.html

sanghyukmoon commented 1 year ago

@changgoo Do you have an easy solution for this?

changgoo commented 1 year ago

from the workflow log, I see these lines

WARNING: autodoc: failed to import module 'boundary' from module 'grid_dendro'; the following exception was raised:
No module named 'numpy'
WARNING: autodoc: failed to import class 'dendrogram.Dendrogram' from module 'grid_dendro'; the following exception was raised:
No module named 'numpy'
WARNING: autodoc: failed to import module 'energy' from module 'grid_dendro'; the following exception was raised:
No module named 'numpy'

This means it doesn't have numpy on the runner. The solution is to add numpy (and other dependencies if exists) in the requirements.txt.

sanghyukmoon commented 1 year ago

Thank you so much! Now it is working fine.