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

[docs] fix R documentation builds (fixes #3655) #3656

Merged
merged 2 commits into from
Dec 18, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,9 @@ def generate_r_docs(app):
source /home/docs/.conda/bin/activate r_env
export TAR=/bin/tar
cd {0}
git submodule update --init --recursive
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix! I think it will be better to use config file for such things.
https://docs.readthedocs.io/en/stable/config-file/v2.html#submodules

Could you please try include the following lines

submodules:
  include: all
  recursive: true

into
https://github.com/microsoft/LightGBM/blob/master/.readthedocs.yml?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P.S. I've enabled RTD builds for the docs/jlamb branch and will keep it turned on as you'd asked.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, I can do that. And thanks for keeping the branch up!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And thanks for keeping the branch up!

image

This will auto-disable RTD builds! 🤣

export R_LIBS="$CONDA_PREFIX/lib/R/library"
Rscript build_r.R
Rscript build_r.R || exit 1
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use -1 for the consistency. It may help to simply a search query in the repo if we decide to change something in the future.

Shouldn't Rscript -e "pkgdown::build_site() cause builds to fail as well?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah you're right

cd {1}
Rscript -e "roxygen2::roxygenize(load = 'installed')"
Rscript -e "pkgdown::build_site( \
Expand Down