Skip to content

chore: update doc links from googleapis.dev to cloud.google.com#1062

Merged
plamut merged 1 commit intomainfrom
to_cgc
Nov 16, 2021
Merged

chore: update doc links from googleapis.dev to cloud.google.com#1062
plamut merged 1 commit intomainfrom
to_cgc

Conversation

@dandhlee
Copy link
Contributor

Updating the reference documentation website from googleapis.dev to cloud.google.com for the index pages. Also updating references in the README.

@dandhlee dandhlee requested a review from a team November 15, 2021 22:40
@dandhlee dandhlee requested a review from a team as a code owner November 15, 2021 22:40
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Nov 15, 2021
@product-auto-label product-auto-label bot added the api: bigquery Issues related to the googleapis/python-bigquery API. label Nov 15, 2021
@plamut
Copy link
Contributor

plamut commented Nov 16, 2021

The change looks good, but there seems to be an unrelated error:

Cannot parse: 1:58: def cancel_job(job_id, project=None, location=None, retry=<google.api_core.retry.Retry object>, timeout=None): pass

Is that related to the recent change in the docs generator?

The problem is that repr() of the default timeout object is not eval()-uable, causing this error. We unfortunately cannot simply take the function signature and wrap it into def ... : pass.

@dandhlee
Copy link
Contributor Author

dandhlee commented Nov 16, 2021

Is that related to the recent change in the generator?

Yes. Two parts, 1) not handling the exception gracefully and 2) unable to resolve some references by the time this signature is extracted. The first problem is handled in googleapis/sphinx-docfx-yaml#152, however I'm unsure whether I can try and format the signature after things are resolved for the second part of the problem.

@plamut
Copy link
Contributor

plamut commented Nov 16, 2021

however I'm unsure whether I can try and format the signature after things are resolved for the second part of the problem.

When all you have is a string, this might indeed be difficult or even impossible in the general case, as __repr__() can return just about anything, even strings that cannot be used to re-construct the instance they are representing.

Even the default object.__repr__() does not return an evaluable representation, so... we might be out of luck here. 🙃
(with the current way code is generated)

>>> class Foo: pass
>>> repr(Foo())
'<__main__.Foo object at 0x7fd95d087d00>'

@dandhlee
Copy link
Contributor Author

Interestingly, this is how it currently gets shown for googleapis.dev docs as well:

cancel_job(job_id: str, project: Optional[str] = None, location: Optional[str] = None, retry: google.api_core.retry.Retry = <google.api_core.retry.Retry object>, timeout: Optional[float] = None)

I was hoping it was something that's plugin specific and the docs we have right now would handle it well, seems like I'll need to dig in deeper :S

@plamut
Copy link
Contributor

plamut commented Nov 16, 2021

I will nevertheless go ahead and merge this, as the docs-presubmit check is not required and the error is unrelated to the link changes here.

@plamut plamut merged commit 942930e into main Nov 16, 2021
@plamut plamut deleted the to_cgc branch November 16, 2021 08:23
@dandhlee
Copy link
Contributor Author

Thanks for helping look into this! I'll take the findings here and log it to better understand this problem to hopefully be able to solve it 😓

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: bigquery Issues related to the googleapis/python-bigquery API. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants