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

docs: add missing methods in api reference #1144

Conversation

AlessandroMiola
Copy link
Contributor

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

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

Related issues

Checklist

  • Code follows style guide (ruff)
  • Tests added
  • Documented the changes

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

Extends utils/check_api_reference.py to include methods from Series.cat, Series.dt, Expr.cat, Expr.dt, Expr.name and Expr.str. (Hope I haven't missed anything:))

@AlessandroMiola AlessandroMiola changed the title Add missing methods in api reference docs: add missing methods in api reference Oct 6, 2024
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Oct 6, 2024
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 @AlessandroMiola for doing this!

@@ -121,6 +121,72 @@
print(extra) # noqa: T201
ret = 1

# Series.cat methods
Copy link
Member

@MarcoGorelli MarcoGorelli Oct 6, 2024

Choose a reason for hiding this comment

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

is it possible to loop over ['cat', 'dt', 'str', 'name'] for these? there's a lot of repetition currently

Copy link
Contributor Author

@AlessandroMiola AlessandroMiola Oct 6, 2024

Choose a reason for hiding this comment

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

Sure! If I'm not wrong, "name" isn't a real namespace for Series as it is for Expr, so I excluded it from the loop. lmk if that's ok or if I am missing something.

Copy link
Member

@FBruzzesi FBruzzesi left a comment

Choose a reason for hiding this comment

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

Thanks @AlessandroMiola ! This is amazing!

If you fancy, as follow up we could also add a check for the difference between Expr vs Series namespaces internal methods, similar to what already happens in lines 212-229

HighFiveViralhogGIF

@AlessandroMiola
Copy link
Contributor Author

Thanks @AlessandroMiola ! This is amazing!

If you fancy, as follow up we could also add a check for the difference between Expr vs Series namespaces internal methods, similar to what already happens in lines 212-229

Yep, sure. Sorry, forgot it earlier πŸ₯Ά

@FBruzzesi FBruzzesi merged commit a2c1a10 into narwhals-dev:main Oct 7, 2024
23 checks passed
akmalsoliev pushed a commit to akmalsoliev/narwhals that referenced this pull request Oct 15, 2024
…#1144)

* docs: add check on Series.dt methods being in api-reference

* docs: add check on Series.cat methods being in api-reference

* chore: remove extra blanks

* docs: add check on documented, yet no longer existent methods on dtype

* docs: add check on Expr.{cat, dt, name, str} methods being in api-reference

* chore: remove useless check and move checks on Series.{cat, dt, str} higher up

* docs: apply suggested changes
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants