-
Notifications
You must be signed in to change notification settings - Fork 117
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
SNOW-1461192: Fix StringMethods and DatetimeProperties docs #1741
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are not showing any implemented APIs from src/snowflake/snowpark/modin/plugin/docstrings/series_utils.py in our doc. Can you help to fix it too?
@sfc-gh-azhan It seems like this is nontrivial to do since sphinx isn't currently autogenerating docstrings for those Series.str or Series.dt. Since this isn't a regression (as far as I can tell, the docs haven't been generated since before we migrated from the snowpandas repo), I'll follow up with it later (SNOW-1464571). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
0b789bd
to
ac46f41
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for the fix!
I'm having some struggles getting doctests to work properly with this new import order. Running individual doctests (for example, I'll continue investigating to see if there's a fix for this, otherwise we might have to find a more primitive workaround to avoid incurring |
@sfc-gh-joshi does that mean if customer runs importlib.reload in their notebook, it could potentially cause problem to their workload also? |
@sfc-gh-yzou Yes, but that's kind of an unavoidable architectural consequence of the extension plugin system. If a user calls From what I can tell, the issue here is occurring because when we call modin's |
ac46f41
to
e00f714
Compare
The fix I've settled on is to manually call I've asked @sfc-gh-mvashishtha to merge a fix for the offending issue (modin-project/modin#7138) some time this week, which will hopefully become available in the next modin release. Until then, we should continue to directly call |
import modin.utils # type: ignore[import] # isort: skip # noqa: E402 | ||
import modin.pandas.series_utils # type: ignore[import] # isort: skip # noqa: E402 | ||
|
||
modin.utils._inherit_docstrings( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good solution!
Which Jira issue is this PR addressing? Make sure that there is an accompanying issue to your PR.
Fixes SNOW-1461192
Fill out the following pre-review checklist:
Please describe how your code solves the related issue.
SNOW-1445536 removed our copies of the
StringMethods
andDatetimeProperties
classes in favor of their upstream modin versions. After this PR, doctests (run viapytest src/snowflake/snowpark/modin/plugin/docstrings/series_utils.py
) still passed, but the__doc__
attributes of these classes' methods were not correctly updated since we did not usemodin.config.DocModule
(onlysnowflake.snowpark.modin.config.DocModule
).This PR sets modin's
DocModule
attribute so the docstrings are appropriately overridden, and changes some module initialization order to accommodate this change.