Skip to content
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: Fixed documentation for few files #40903

Merged
merged 17 commits into from
Apr 26, 2021

Conversation

ShaharNaveh
Copy link
Member

@ShaharNaveh ShaharNaveh commented Apr 12, 2021

  • tests added / passed
  • Ensure all linting tests pass, see here for how to run them

...
ValueError: negative dimensions are not allowed

>>> validate_indices(np.ndarray([0, 1]), 0) # OK
Copy link
Member Author

Choose a reason for hiding this comment

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

The docs in master ATM says it should raise an IndexError, but it does not.
Would be glad if someone will take a look here

Copy link
Member

Choose a reason for hiding this comment

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

Why are you using np.ndarray instead of np.array? The latter one raises

Copy link
Member Author

Choose a reason for hiding this comment

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

Why are you using np.ndarray instead of np.array? The latter one raises

I complety missed it, I have pushed a fix for it in 857c110

@jreback jreback added the Docs label Apr 12, 2021
@jreback
Copy link
Contributor

jreback commented Apr 12, 2021

dont' we have a master issue for this? (e.g. getting all doc-tests running)? cc @MarcoGorelli

@MarcoGorelli
Copy link
Member

dont' we have a master issue for this? (e.g. getting all doc-tests running)? cc @MarcoGorelli

I wasn't aware that not all doctests were running - anyway, there's #22459 still open

@@ -138,6 +138,10 @@ if [[ -z "$CHECK" || "$CHECK" == "doctests" ]]; then

# Individual files

MSG='Doctests algorithms.py' ; echo $MSG
Copy link
Contributor

Choose a reason for hiding this comment

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

can these be combined? e.g. 1 for files, 1 for directories

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure, will open a separate PR for that.

... pd.Timestamp("20160101", tz="US/Eastern"),
... ]
... )
... )
DatetimeIndex(['2016-01-01 00:00:00-05:00'],
Copy link
Member

Choose a reason for hiding this comment

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

Format here looks a bit odd?

Copy link
Member Author

Choose a reason for hiding this comment

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

That's the "Black" formatting.

I personally think it's easier on the eyes, but that's not a deal breaker for me.

Can revert if you think it's best to leave it as it was before

Copy link
Member

Choose a reason for hiding this comment

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

Sorry if this was misleading, I was referring to the lines you haven‘t touched, they look out of sync now

Copy link
Member Author

Choose a reason for hiding this comment

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

I didn't managed to get the output lines to follow the "black" formatting styles.

What I could do is to make the output to appear in a single line, instead of multiple by using \. i.e

def foo():
    """
    Examples
    --------------
    >> foo()
    Line1 \
Line 2 \
Line 3 \
    """

Will result in the docs as:

>>> foo()
Line 1 Line 2 Line 3

Copy link
Member

Choose a reason for hiding this comment

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

Sounds good to me

@phofl
Copy link
Member

phofl commented Apr 20, 2021

small comment, otherwise lgtm

@jreback jreback added this to the 1.3 milestone Apr 23, 2021
Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

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

looks good, ex @phofl comment, ping on green

@ShaharNaveh ShaharNaveh requested a review from phofl April 26, 2021 12:40
@jreback
Copy link
Contributor

jreback commented Apr 26, 2021

lgtm @phofl over to you

@phofl phofl merged commit a82f8e2 into pandas-dev:master Apr 26, 2021
@phofl
Copy link
Member

phofl commented Apr 26, 2021

thanks @ShaharNaveh

@ShaharNaveh ShaharNaveh deleted the DOC-Fix-algo-index-nan branch April 28, 2021 13:01
yeshsurya pushed a commit to yeshsurya/pandas that referenced this pull request May 6, 2021
JulianWgs pushed a commit to JulianWgs/pandas that referenced this pull request Jul 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants