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

fix: retrieve constructors #181

Merged
merged 1 commit into from
Feb 15, 2022
Merged

fix: retrieve constructors #181

merged 1 commit into from
Feb 15, 2022

Conversation

dandhlee
Copy link
Collaborator

Because of a Sphinx configuration set up on the Client libraries, Sphinx will try and combine the constructor and the Class definition together. However, from the Plugin side this is encountered as two separate docstrings with same name and _type == CLASS. Since we tried avoiding duplicate entries, this ended up getting rid of the constructors.

Retrieved constructors by identifying them (on their second encounter) as a method. The original class definition will retain much information about it as it can, with minimal overlap between the two. There can be an overlap for the constructor syntax showing both on the class header definition and the constructor method definition, I will ask for feedback on whether this should be okay or not.

As well, removing arguments with empty var_type or description. Missing either two likely results from a typo or from incomplete documentation which should be brought up with the respective client library owners.

Fixes b/208869740, b/208866895.

@dandhlee dandhlee requested a review from a team as a code owner February 12, 2022 05:25
@dandhlee dandhlee requested a review from a team February 12, 2022 05:25
Copy link
Contributor

@busunkim96 busunkim96 left a comment

Choose a reason for hiding this comment

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

As well, removing arguments with empty var_type or description. Missing either two likely results from a typo or from incomplete documentation which should be brought up with the respective client library owners.

Could you share an example of a docstring where this would happen?

@dandhlee
Copy link
Collaborator Author

Missing var_type from an extra character typo, which results in the type not getting parsed properly.

Missing entries and therefore showing up as undefined in the doc: https://github.com/googleapis/python-aiplatform/blob/main/google/cloud/aiplatform/training_jobs.py#L3958-L3962. Trying to handle this more gracefully by not including this in the doc rather than showing them as None(.

@dandhlee dandhlee merged commit 1e6efa4 into main Feb 15, 2022
@dandhlee dandhlee deleted the retrieve_constructors branch February 15, 2022 22:44
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.

2 participants