8000 DOC Fix notebook-style for plot_document_clustering.py by gpapadok · Pull Request #22443 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

DOC Fix notebook-style for plot_document_clustering.py #22443

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 2 commits into from
Feb 14, 2022
Merged

DOC Fix notebook-style for plot_document_clustering.py #22443

merged 2 commits into from
Feb 14, 2022

Conversation

gpapadok
Copy link
Contributor
@gpapadok gpapadok commented Feb 10, 2022

Reference Issues/PRs

For #22406

What does this implement/fix? Explain your changes.

Any other comments?

@glemaitre glemaitre changed the title Fix notebook-style for plot_document_clustering.py DOC FIX notebook-style for plot_document_clustering.py Feb 11, 2022
@glemaitre glemaitre changed the title DOC FIX notebook-style for plot_document_clustering.py DOC Fix notebook-style for plot_document_clustering.py Feb 11, 2022
@glemaitre
Copy link
Member

@gpapadok Thanks for the PR.

This example is indeed really old. I think that it would benefit from a full rewriting by removing all options to use it as a script, rewrite it into smaller and easier code cells, and add the explanations next to the code cells then.

Such rewriting would require more time. I propose to merge this PR first. @gpapadok would like to contribute a rewriting of the example? If not, we will add this example into a pool of examples that needs to be revamped.

@@ -134,8 +134,10 @@ def is_interactive():
sys.exit(1)


# #############################################################################
# %%
Copy link
Member

Choose a reason for hiding this comment

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

Looking at the rendering, I see that we always print the documentation if we are using the file as a script.

Could you edit the l.121 to not print it in interactive mode?

@gpapadok
Copy link
Contributor Author

@glemaitre Edited as requested.

I will update the example too and make a separate PR.

@glemaitre glemaitre merged commit f13015e into scikit-learn:main Feb 14, 2022
@glemaitre
Copy link
Member

Thanks @gpapadok.

This is good to be merged as a first iteration.

@lesteve lesteve mentioned this pull request Feb 17, 2022
47 tasks
@gpapadok gpapadok deleted the notebook-style-examples branch February 19, 2022 01:13
thomasjpfan pushed a commit to thomasjpfan/scikit-learn that referenced this pull request Mar 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0