-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
DOC: fix EX03 errors in docstrings #56804
Comments
I can take the first two methods.
|
I will work for: |
Just to be sure, and to clarify for later contributors, the error EX03 refers to all possible flake8 errors. Reference #27977. |
Working on :
|
working on:
|
I wrote a comment but accidentally deleted it 🤦♂️ tl;dr - if a method is passed to |
Im new to this and maybe I overlook something fundamental: After executing:
I get a list of
However, after adding an extra space and saving the docstring for
and rerunning the above |
Otherwise id take:
|
Working on:
|
So for
|
Hi all, I've opened a PR for the following pandas.core.groupby.DataFrameGroupBy.describe |
Hi all, I've opened a PR for the following pandas.core.resample.Resampler.fillna |
Hi all, I've opened a PR for the following pandas.DataFrame.idxmax |
Even I am new and facing similar issue . Even after making the changes the error logs don't change |
Explanation of what to look for: EX03 is the errors for the example code-blocks in a function/method's documentation for Examples
--------
>>> df = pd.DataFrame({'A': [1, 1, 1, 2, 2],
... 'B': range(5),
... 'C': range(5)})
>>> df.groupby('A').B.agg({'foo': 'count'}) # doctest: +SKIP
... # SpecificationError: nested renamer is not supported
>>> df.groupby('A').agg({'B': {'foo': ['sum', 'max']}}) # doctest: +SKIP
... # SpecificationError: nested renamer is not supported
>>> df.groupby('A').agg(['min', 'min']) # doctest: +SKIP
... # SpecificationError: nested renamer is not supported line 4 here would be the 4th line in the examples which is line 6 would be |
@asishm what kind of flake8 errors did you get? |
there's also a non flake8 error reported see #56804 (comment) and #56827 (comment) for details @natmokval |
@asishm can you try adding a space before each of these |
yeah that's the fix - sorry if it wasn't clear, it was more of an explanation for people that had trouble figuring out the lines affected. |
Okay! Makes sense. Hope the photo might help someone else then 🙂 |
Maybe it |
I've fixed the following: pandas.Series.to_latex |
I'll take:
|
@jordan-betterman it looks like |
@jordan-d-murphy sounds good! Are there any others that need fixing? |
yes, if you check https://github.com/pandas-dev/pandas/blob/main/ci/code_checks.sh on the main branch, it looks like these are still remaining:
|
@jordan-d-murphy great I'll take those! |
@jordan-d-murphy how do I update the |
@jordan-betterman when you are running it, you can use this format: |
@jordan-d-murphy I'm having the same issues as this comment. |
@jordan-betterman see if this comment helps - #56804 (comment) |
@asishm I saw that comment and was really helpful! I think the issue is when I run the This are the changes I made:
This is what the script evaluated
Is there something in the setup that I need to change for it to work? This is my first day working in the repo, so it could be something on my end! |
@jordan-betterman can you post the script you're running and the output? |
script: Output:
|
hmmm okay, yes your approach seems correct, but when I ran this on the latest branch I'm seeing no EX03 errors for I've been using the following approach to set up my dev env and working branch before working on my PRs, which ensures my branch is up to date with the latest version of main. can you try running these commands, and then try running your script again and see if it helps? Updating the development environment git checkout main git checkout main After running the above commands, running the following script
|
I tried all of that and still didn't work. I'm going to stop working on it and find another issue to take on. Thanks for all the help! |
Okay, sorry to hear it didn't work out. Thanks for giving it a shot! |
I've opened a PR for the remaining 4 functions. I believe this will close this issue. pandas.Series.plot.line |
@natmokval now that #57025 has been merged in, I believe we can close this issue. Please let me know if you see any additional work that needs to be done, I'd be happy to clean up any loose ends! |
@jordan-d-murphy, I agree, seems we fixed all flake8 errors. Thank you for working on this issue with intensity and helping other contributors. Now, we can close this issue. |
Awesome, thanks all! |
pandas has a script for validating docstrings
pandas/ci/code_checks.sh
Lines 72 to 172 in b7e2202
Currently, some methods fail the EX03 check.
The task here is:
method-name
Please don't comment
take
as multiple people can work on this issue. You also don't need to ask for permission to work on this, just comment on which methods are you going to work.If you're new contributor, please check the contributing guide
thanks @MarcoGorelli for giving me the idea for this issue.
The text was updated successfully, but these errors were encountered: