Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Added utils.gen_batches in documentation, Solving issue #19681 #19688

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 20 commits into from
Mar 17, 2021
Merged

Added utils.gen_batches in documentation, Solving issue #19681 #19688

merged 20 commits into from
Mar 17, 2021

Conversation

seanbenhur
Copy link
Contributor

@seanbenhur seanbenhur commented Mar 16, 2021

Closes #19681

What does this implement/fix? Explain your changes.

Added utils.gen_batches in documentation file

Any other comments?

My first PR, if I had done any mistake, let me know !

Added utils.gen_batches in documentation, Solving issue #19681
Copy link
Contributor

@cmarmo cmarmo left a comment

Choose a reason for hiding this comment

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

Thanks @seamusabshere @seanbenhur! All checks are green and the search in the rendered documentation contains gen_batches. LGTM!

@seanbenhur
Copy link
Contributor Author

Thanks @cmarmo, I guess you have misspelled my name!

Copy link
Member

@rth rth left a comment

Choose a reason for hiding this comment

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

Thanks @seanbenhur and @cmarmo !

@rth
Copy link
Member

rth commented Mar 16, 2021

Another thing that would have been great, if you are still interested @seanbenhur is to cross link gen_batches and gen_even_slices by adding a 'See Also' section to each of them and linking to the other function. See an example of such section here.

If not, we can merge this and open a separate PR.

@seanbenhur
Copy link
Contributor Author

Sure @rth, I will work on it

Copy link
Contributor

@cmarmo cmarmo left a comment

Choose a reason for hiding this comment

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

Thanks @seanbenhur ... :) (with the right spelling this time).
I have added suggestions to fix the lint errors

sklearn/utils/__init__.py Outdated Show resolved Hide resolved
sklearn/utils/__init__.py Outdated Show resolved Hide resolved
seanbenhur and others added 3 commits March 17, 2021 09:01
Co-authored-by: Chiara Marmo <cmarmo@users.noreply.github.com>
Co-authored-by: Chiara Marmo <cmarmo@users.noreply.github.com>
@seanbenhur
Copy link
Contributor Author

I just committed the suggested change, but it still fails

@cmarmo
Copy link
Contributor

cmarmo commented Mar 17, 2021

You can click on the 'details' link to check the lint error message. Apparently there is still one, indeed:

sklearn/utils/__init__.py:693:1: W293 blank line contains whitespace

@seanbenhur
Copy link
Contributor Author

I apologize, but seeing error messages, it seems I have to change the documentation right!?

Copy link
Contributor

@cmarmo cmarmo left a comment

Choose a reason for hiding this comment

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

I apologize, but seeing error messages, it seems I have to change the documentation right!?

This time is the documentation engine (sphinx) complaining. Blank lines should be kept after the titles. The previous lint error was telling you that some blank spaces were present in a blank line.

sklearn/utils/__init__.py Outdated Show resolved Hide resolved
sklearn/utils/__init__.py Outdated Show resolved Hide resolved
seanbenhur and others added 2 commits March 17, 2021 15:30
Co-authored-by: Chiara Marmo <cmarmo@users.noreply.github.com>
Co-authored-by: Chiara Marmo <cmarmo@users.noreply.github.com>
@cmarmo
Copy link
Contributor

cmarmo commented Mar 17, 2021

Sorry @seanbenhur I believe I'm having issues with the suggestions.... there are some blank spaces I can't see: do you mind removing them locally? Thanks!

sklearn/utils/__init__.py Outdated Show resolved Hide resolved
@seanbenhur
Copy link
Contributor Author

seanbenhur commented Mar 17, 2021 via email

sklearn/utils/__init__.py Outdated Show resolved Hide resolved
Co-authored-by: Chiara Marmo <cmarmo@users.noreply.github.com>
@cmarmo
Copy link
Contributor

cmarmo commented Mar 17, 2021

Yep, I am currently working on that, Thanks for the support

Thanks for your patience! :)

seanbenhur and others added 3 commits March 17, 2021 15:45
Co-authored-by: Chiara Marmo <cmarmo@users.noreply.github.com>
sklearn/utils/__init__.py Outdated Show resolved Hide resolved
Co-authored-by: Chiara Marmo <cmarmo@users.noreply.github.com>
@cmarmo
Copy link
Contributor

cmarmo commented Mar 17, 2021

If it can be useful, here you can find some resources about how to track CI failures.

@cmarmo
Copy link
Contributor

cmarmo commented Mar 17, 2021

sphinx again... you need to add a blank line before the title as shown here.

@seanbenhur
Copy link
Contributor Author

If it can be useful, here you can find some resources about how to track CI failures.

Thank you, its helpful

Copy link
Member

@jeremiedbb jeremiedbb left a comment

Choose a reason for hiding this comment

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

Thanks @seanbenhur. You have 2 linting failures, otherwise lgtm.

sklearn/utils/__init__.py Outdated Show resolved Hide resolved
sklearn/utils/__init__.py Outdated Show resolved Hide resolved
seanbenhur and others added 2 commits March 17, 2021 18:28
Co-authored-by: Jérémie du Boisberranger <34657725+jeremiedbb@users.noreply.github.com>
Co-authored-by: Jérémie du Boisberranger <34657725+jeremiedbb@users.noreply.github.com>
@cmarmo
Copy link
Contributor

cmarmo commented Mar 17, 2021

Hi @seanbenhur I think using the github suggestions is no longer a good idea. The issue here is that you need a blank line at lines 693 and 745 in order to avoid sphinx warnings. It seems that each time you add the blank line your editor adds an automatic indentation that makes lint unhappy. For some reason removing the indentation via suggestions removes the blank line. Do you mind making the modification on your local repository?
You can then check the lint with

$ flake8 sklearn/utils/__init__.py

Also, do you mind adding dashes under the "See Also" title until the end of the title as in this example?
Thank you very much.

@rth
Copy link
Member

rth commented Mar 17, 2021

I pushed the fix. It's indeed some issue with GH suggestions.

@seanbenhur
Copy link
Contributor Author

Thanks for your suggestions and help @cmarmo , I guess the issue was resolved!, From next time I will folliw these best practices!

Copy link
Member

@jeremiedbb jeremiedbb left a comment

Choose a reason for hiding this comment

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

Thanks @seanbenhur and @cmarmo !

@jeremiedbb jeremiedbb merged commit 04f84c6 into scikit-learn:main Mar 17, 2021
@glemaitre glemaitre mentioned this pull request Apr 22, 2021
12 tasks
glemaitre pushed a commit to glemaitre/scikit-learn that referenced this pull request Apr 22, 2021
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.

utils.gen_batches missing from documentation
4 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.