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][data] auto-gen GroupedData api #46925

Merged
merged 2 commits into from
Aug 7, 2024
Merged

[doc][data] auto-gen GroupedData api #46925

merged 2 commits into from
Aug 7, 2024

Conversation

can-anyscale
Copy link
Collaborator

Use _autogen to auto-generate GroupedData api documentation, so that we don't need to enumerate the list of public APIs anymore. Note that in the new look, constructor is un-folded by default. This is to be consistent with how we document classes elsewhere (e.g. https://docs.ray.io/en/latest/data/api/dataset.html)

readthedoc is currently broken on master which is unrelated to this change

Before:

Screenshot 2024-08-01 at 3 22 50 PM

After:

Screenshot 2024-08-01 at 3 22 40 PM

Test:

  • CI

:toctree: doc/

aggregate.AggregateFn
.. include:: ray.data.grouped_data.GroupedData.rst
Copy link
Member

Choose a reason for hiding this comment

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

@can-anyscale not blocking since this is already an issue, but is there a way to hide the constructor for GroupedData? It shouldn't be exposed to the user

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

lol i see, i think so yes - but without a constructor, how users can create an object to invoke the its public methods?

Copy link
Member

Choose a reason for hiding this comment

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

Users should call the Dataset.groupby() method

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

got you

@@ -32,7 +35,6 @@ def __repr__(self) -> str:
return "T" + self.data.__repr__()


@PublicAPI
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@bveeramani: i remove this annotation at the class level; and if this is missing, we assume its constructor is private

So we omit the constructor in the doc now, let me know if you like it, thankks

Screenshot 2024-08-06 at 12 23 31 PM

Copy link
Member

Choose a reason for hiding this comment

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

Nice

@can-anyscale can-anyscale enabled auto-merge (squash) August 7, 2024 00:02
@github-actions github-actions bot added the go add ONLY when ready to merge, run all tests label Aug 7, 2024
@can-anyscale can-anyscale merged commit 23453a2 into master Aug 7, 2024
7 checks passed
@can-anyscale can-anyscale deleted the can-dd01 branch August 7, 2024 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go add ONLY when ready to merge, run all tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants