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(bigquery): add description for routine entities #9785

Conversation

HemangChothani
Copy link
Contributor

Fixes #9782

@HemangChothani HemangChothani requested review from tswast, plamut and a team November 13, 2019 14:07
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Nov 13, 2019
@tseaver
Copy link
Contributor

tseaver commented Nov 13, 2019

/cc @shollyman

Copy link
Contributor

@plamut plamut left a comment

Choose a reason for hiding this comment

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

UPDATE: Nah, sorry, it does seem to work. I had to delete docs/generated directory as well (and not just docs/_build)


It seems that the description property is present in the generated docs, but in not the attributes summary table (unlike other Routine attributes).

Screenshot from 2019-11-14 09-41-15

Edit: Hmm, it might be a local cache issue, let me re-check. (nope, it is indeed missing from the attributes summary)

@@ -239,6 +240,17 @@ def body(self):
def body(self, value):
self._properties[self._PROPERTY_TO_API_FIELD["body"]] = value

@property
def description(self):
"""Union[str, None]: Description of the routine (defaults to
Copy link
Contributor

@plamut plamut Nov 14, 2019

Choose a reason for hiding this comment

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

(nit)
Mypy docs recommend using the Optional shorthand instead of a Union with None.

Suggested change
"""Union[str, None]: Description of the routine (defaults to
"""Optional[str]: Description of the routine (defaults to

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ohk, should i change same in the other files which has description property like in dataset.py and model.py .

Copy link
Contributor

Choose a reason for hiding this comment

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

Strictly speaking it is not in scope of this PR, but if it's not too much work, it would be a welcome cleanup IMO. 👍

Copy link
Contributor

@plamut plamut left a comment

Choose a reason for hiding this comment

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

LGTM.

There are still usages of Union[foo, None], but with other attributes, thus let's leave that out for another time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BigQuery: add Description for Routine entities
5 participants