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

RFC, chore: shrink series module docstrings #1976

Merged
merged 2 commits into from
Feb 9, 2025

Conversation

FBruzzesi
Copy link
Member

@FBruzzesi FBruzzesi commented Feb 8, 2025

What type of PR is this? (check all applicable)

  • πŸ’Ύ Refactor
  • ✨ Feature
  • πŸ› Bug Fix
  • πŸ”§ Optimization
  • πŸ“ Documentation
  • βœ… Test
  • 🐳 Other

Related issues

If you have comments or can explain your changes, please do so below

  • Is this an overkill? It almost cuts in half the file lines
  • Reason to always go to to_native() is mainly ArrowSeries repr not being great when ELLIPSIS are required to pass the doctest

@FBruzzesi FBruzzesi added documentation Improvements or additions to documentation internal labels Feb 8, 2025
@FBruzzesi FBruzzesi changed the title RFC, chore: reduce series module docstrings RFC, chore: shrink series module docstrings Feb 9, 2025
@FBruzzesi FBruzzesi marked this pull request as ready for review February 9, 2025 09:33
Comment on lines +143 to +145
>>> nw.from_native(s_native, series_only=True)[
... :2
... ].to_native() # doctest:+ELLIPSIS
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
>>> nw.from_native(s_native, series_only=True)[
... :2
... ].to_native() # doctest:+ELLIPSIS
>>> s = nw.from_native(s_native, series_only=True)
>>> s[:2].to_native() # doctest:+ELLIPSIS

Comment on lines 199 to 201
>>> nw.from_native(
... s_native, series_only=True
... ).to_native() # doctest: +NORMALIZE_WHITESPACE
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
>>> nw.from_native(
... s_native, series_only=True
... ).to_native() # doctest: +NORMALIZE_WHITESPACE
>>> s = nw.from_native(s_native, series_only=True)
>>> s.to_native() # doctest: +NORMALIZE_WHITESPACE

Comment on lines 302 to 304
>>> nw.from_native(s_native, series_only=True).pipe(
... lambda x: x + 2
... ).to_native() # doctest: +NORMALIZE_WHITESPACE
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
>>> nw.from_native(s_native, series_only=True).pipe(
... lambda x: x + 2
... ).to_native() # doctest: +NORMALIZE_WHITESPACE
>>> s = nw.from_native(s_native, series_only=True)
>>> s.pipe(lambda x: x + 2).to_native() # doctest: +NORMALIZE_WHITESPACE

Comment on lines 792 to 794
>>> nw.from_native(s_native, series_only=True).is_in(
... [3, 2, 8]
... ).to_native() # doctest: +ELLIPSIS
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
>>> nw.from_native(s_native, series_only=True).is_in(
... [3, 2, 8]
... ).to_native() # doctest: +ELLIPSIS
>>> s = nw.from_native(s_native, series_only=True)
>>> s.is_in([3, 2, 8]).to_native() # doctest: +ELLIPSIS

Copy link
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

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

thanks a tonne for doing this @FBruzzesi !

@MarcoGorelli MarcoGorelli merged commit fdc05df into main Feb 9, 2025
26 checks passed
@MarcoGorelli MarcoGorelli deleted the chore/series-docstring-redux branch February 9, 2025 11:03
@FBruzzesi
Copy link
Member Author

Thanks @MarcoGorelli ! I hope this gives us some buffer for new features now 😁

@MarcoGorelli
Copy link
Member

πŸ˜„ definitely

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation internal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants