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

FEAT-#6983: Add Pluggable Documentation Module Support #6986

Merged
merged 15 commits into from Mar 5, 2024

Conversation

sfc-gh-dpetersohn
Copy link
Contributor

@sfc-gh-dpetersohn sfc-gh-dpetersohn commented Feb 29, 2024

What do these changes do?

Add support for custom documentation defined at runtime.

  • first commit message and PR title follow format outlined here

    NOTE: If you edit the PR title to match this format, you need to add another commit (even if it's empty) or amend your last commit for the CI job that checks the PR title to pick up the new PR title.

  • passes flake8 modin/ asv_bench/benchmarks scripts/doc_checker.py
  • passes black --check modin/ asv_bench/benchmarks scripts/doc_checker.py
  • signed commit with git commit -s
  • Resolves Documentation plugin #6983
  • tests added and passing
  • module layout described at docs/development/architecture.rst is up-to-date

Signed-off-by: Devin Petersohn <devin.petersohn@snowflake.com>
Signed-off-by: Devin Petersohn <devin.petersohn@snowflake.com>
Signed-off-by: Devin Petersohn <devin.petersohn@snowflake.com>
Signed-off-by: Devin Petersohn <devin.petersohn@snowflake.com>
Copy link
Contributor Author

@sfc-gh-dpetersohn sfc-gh-dpetersohn left a comment

Choose a reason for hiding this comment

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

This PR doesn't change anything about the current behavior when it comes to docs, it only applies changes when the developer wants to modify the docs with this class.

We may want to use this in the future to have different docs for Ray, Dask, or other engines.

@@ -1093,6 +1093,18 @@ def isin(self, values): # noqa: PR01, RT01, D200
"""
return super(DataFrame, self).isin(values)

def isna(self):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These had to be added to both Series and DataFrame because they share docs, but we may not want them to in the Documentation class.

In a separate PR, I think we should add the rest of these, but for now I have left it to these two as a proof of concept for what will be needed in the future. The tests will not pass if we do not have the distinction with Series and DataFrame.

modin/config/envvars.py Outdated Show resolved Hide resolved
modin/config/envvars.py Outdated Show resolved Hide resolved
modin/config/test/docs_module/__init__.py Outdated Show resolved Hide resolved
modin/config/test/test_envvars.py Outdated Show resolved Hide resolved
modin/config/test/docs_module/classes.py Show resolved Hide resolved
modin/config/test/docs_module/__init__.py Outdated Show resolved Hide resolved
@YarShev
Copy link
Collaborator

YarShev commented Mar 1, 2024

Also, many jobs failed. Please take a look.

sfc-gh-dpetersohn and others added 7 commits March 1, 2024 12:08
Signed-off-by: Devin Petersohn <devin.petersohn@snowflake.com>
Signed-off-by: Devin Petersohn <devin.petersohn@snowflake.com>
Co-authored-by: Iaroslav Igoshev <Poolliver868@mail.ru>
Signed-off-by: Devin Petersohn <devin.petersohn@snowflake.com>
Signed-off-by: Devin Petersohn <devin.petersohn@snowflake.com>
Signed-off-by: Devin Petersohn <devin.petersohn@snowflake.com>
Signed-off-by: Devin Petersohn <devin.petersohn@snowflake.com>
@YarShev
Copy link
Collaborator

YarShev commented Mar 1, 2024

This PR doesn't change anything about the current behavior when it comes to docs, it only applies changes when the developer wants to modify the docs with this class.

We may want to use this in the future to have different docs for Ray, Dask, or other engines.

Could you elaborate a bit on why we may want to have different docs Ray, Dask, or other engines?

@sfc-gh-dpetersohn
Copy link
Contributor Author

Could you elaborate a bit on why we may want to have different docs Ray, Dask, or other engines?

Some engines may have different expectations, particularly databases. If a database engine doesn't have the same guarantees as Ray or Dask, it should be reflected in the documentation.

@YarShev
Copy link
Collaborator

YarShev commented Mar 4, 2024

@sfc-gh-dpetersohn, got it, thanks for the clarification. CI is still failing, please take a look. For instance, lint (pydocstyle) failed because of the following error.

D200: One-line docstring should fit on one line with quotes (found 3)

Signed-off-by: Devin Petersohn <devin.petersohn@snowflake.com>
@sfc-gh-dpetersohn
Copy link
Contributor Author

Thanks for the ping @YarShev, I think I fixed everything (we will see if it passes 😄). It seems we are not super consistent with D200 on pydocstyle since there are multiple instances of the docstrings being formatted this way. I will fix the new ones in this PR but maybe we should consider more standardization in the future?

Signed-off-by: Devin Petersohn <devin.petersohn@snowflake.com>
Signed-off-by: Devin Petersohn <devin.petersohn@snowflake.com>
@sfc-gh-dpetersohn sfc-gh-dpetersohn enabled auto-merge (squash) March 4, 2024 19:13
@YarShev
Copy link
Collaborator

YarShev commented Mar 4, 2024

Thanks for the ping @YarShev, I think I fixed everything (we will see if it passes 😄). It seems we are not super consistent with D200 on pydocstyle since there are multiple instances of the docstrings being formatted this way. I will fix the new ones in this PR but maybe we should consider more standardization in the future?

I see that we are really not consistent with D200. We just put noqa: D200 in those places but we should definitely consider more standardization on this matter in the future.

@YarShev
Copy link
Collaborator

YarShev commented Mar 4, 2024

@sfc-gh-dpetersohn, build docs is the last job left to fix. Can you take a look? It seems the issue relates to docstrings from which we build docs.

Signed-off-by: Devin Petersohn <devin.petersohn@snowflake.com>
@sfc-gh-dpetersohn
Copy link
Contributor Author

@YarShev finally figured out the issue

Copy link
Collaborator

@YarShev YarShev left a comment

Choose a reason for hiding this comment

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

@sfc-gh-dpetersohn, LGTM, thanks!

@sfc-gh-dpetersohn sfc-gh-dpetersohn merged commit 338c501 into modin-project:master Mar 5, 2024
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Documentation plugin
2 participants