8000 BUG: do not filter searchindex for pdf doc generation by thomasjpfan · Pull Request #15433 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

BUG: do not filter searchindex for pdf doc generation #15433

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

Merged
merged 4 commits into from
Nov 1, 2019

Conversation

thomasjpfan
Copy link
Member

Fixes bug on master where filter_search_index tries to run when searchindex.js does not exist. searchindex.js does not exist when we are building a pdf.

CC @lesteve @jnothman @rth

if not os.path.exists(searchindex_path):
return

print('Removing methods from search index')
Copy link
Member

Choose a reason for hiding this comment

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

Is that a temporary debugging print statement you meant to remove?

Copy link
Member

Choose a reason for hiding this comment

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

OK ignore me, I am seeing that it was moved from above.

doc/conf.py Outdated
searchindex_path = os.path.join(app.builder.outdir, 'searchindex.js')

if not os.path.exists(searchindex_path):
Copy link
Member

Choose a reason for hiding this comment

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

Not a sphinx expert, but maybe you could use app.builder to only run filter_search_index where the builder is the HTML one?

Alternatively, there may be a sphinx-specific to register hooks (or event or whatever the sphinx actual terms is) only for some builders.

@lesteve
Copy link
Member
lesteve commented Nov 1, 2019

That looks good to me, let's merge this one to make master green again (hopefully)!

@lesteve lesteve changed the title [MRG] BUG Does not filter searchindex for pdf generation BUG: do not filter searchindex for pdf doc generation Nov 1, 2019
@lesteve lesteve merged commit 53082e9 into scikit-learn:master Nov 1, 2019
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.

2 participants
0