-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
DOC: Fix code style in documentation #36777
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
Comments
I'd like to work on this @dsaxton. |
Sure, feel free to submit a PR |
Are there any docs you'd like me to fix first? @dsaxton |
Up to you, probably the best way would be to browse through the rst files in https://github.com/pandas-dev/pandas/tree/master/doc/source (the |
Files I reformatted in #36780 so others won't do double work:
|
@dsaxton Any ideas about docs needed to be fixed first? I would like to contribute. I am also planning to hold a Hacktoberfest meetup and I am sure there would be some guys who would love to help pandas, so I would really appreciate it if you could make some kind of prioritized list of docs which should be fixed first. |
That would be awesome, @erfannariman put together a list of files (thank you!) that I just added to the OP |
As @dsaxton already mentioned here the |
It looks like the following are already compliant with blacken and flake8 and need no additional formatting. doc/source/development:
doc/source/user_guide:
|
Upon further inspection, it looks like doc/source/user_guide/text.rst is also fine as is. |
Sorry, did I do the right thing here or not? a3850c9 |
That looks fine aside from the line wrapping of dtypes (although this file has already been fixed) |
Sure, thank you! |
timedeltas.rst and timeseries.rst are fixed. |
@dsaxton - Thought of contributing to this issue, went through most of the files in pandas/doc/source and found them to be formatted similar to https://github.com/pandas-dev/pandas/pull/36700/files. Is this whole list complete? |
Yes I think everything is pretty much fixed, but will probably leave open for a little bit in case anything else shows up. Edit: @SambhaviPD it looks like /user_guide/merging.rst still has issues if you wanted to work on those |
The docs use certain coding style conventions that are no longer used in pandas (e.g., we adopt black's opinions in terms of line wrapping and quoting), for instance https://pandas.pydata.org/pandas-docs/stable/user_guide/merging.html. We should update the docs to match current style preferences.
blacken-docs is a useful tool that can help in doing some of this formatting, but it has to be used carefully since it might render lines that are too long and will fail flake8-rst checks, or it may not be able to parse certain files because of nuances in how the docs are written (raw output or magic commands in code blocks). One approach is to comment out the erring lines, let the tool handle all the others, then finish the commented lines manually.
Example cleanup: https://github.com/pandas-dev/pandas/pull/36700/files
List of files that need updating (if you submit a PR be sure to link back to this issue):
doc/source/development:
doc/source/getting_started/comparison:
doc/source/getting_started/intro_tutorials:
doc/source/getting_started:
doc/source/user_guide:
The text was updated successfully, but these errors were encountered: