-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Changing Key noun to be Blob in storage package. #560
Conversation
@tseaver I'm not certain that >>> from gcloud.storage.object_ import Object
>>> object = Object('foo')
>>>
>>> class MyClass(object):
... pass
...
>>> MyClass
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "gcloud/storage/object_.py", line 110, in __repr__
bucket_name = self.bucket.name
AttributeError: 'str' object has no attribute 'name'
>>> m = MyClass()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'Object' object is not callable and not understanding why they break. |
@tseaver @jgeewax This is what we discussed earlier today. It's going to be a bear to manage this PR while also changing other parts of the Ideas put forth today (in order of my preference, best to last):
The current language (removed in this PR) is:
For me, this language is not prevalent enough and I worry that straying away from "object" (even for |
Your list above is my exact order of preference. What might be worthwhile is to figure out how to make the Sphinx documentation generate the left-hand navigation from "Storage --> Keys" to "Storage --> Blobs (Objects)". This way, when I'm looking for familiar terms from the docs, I still see what I was looking for, but get the picture right away. I think the note you have above should be a |
@jgeewax I was more worried about when they search in the API docs, not the docs for our library. The API docs will be more definitive / comprehensive than our library docs. Do we think anyone from storage has gone through this existential naming issue with |
apitools autogenerates Object as part of its messages file, because that is the resource name. What makes it usable in practice is that the module name is not "object". That way, it's not that confusing in practice because you're typically referencing it via "messages.Object" or the like. With that said, apitools maps 1:1 to the API, which I don't believe is the goal here. gcloud-python will have its own docs, yes? Are clients intended to interact with the API directly in the same codebase where they are using gcloud-python? If not, matching the API docs is reduced in importance. |
Yes we have our own docs. Your input "matching the API docs is reduced in importance" is good to know; I wasn't sure how worried we should be about a vocab gap. I am going to go thrown and use |
This involves changes in all documentation, renaming a module and a test module, and updating the calls and variable names in a regression test module. Fixes googleapis#544.
@tseaver I just updated from object -> blob. PTAL. If you want an ad hoc set of smaller commits, check out |
Changes Unknown when pulling 4570c43 on dhermes:fix-544 into * on GoogleCloudPlatform:master*. |
Reviewing now. |
LGTM. Since Travis doesn't check it for PRs, I also verified that the regression tests pass. |
Thanks. I also run the regression tests locally before sending PRs. |
Changing Key noun to be Blob in storage package.
…[autoapprove] (#560) Source-Link: googleapis/synthtool@4826337 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:60a63eddf86c87395b4bb394fdddfe30f84a7726ee8fe0b758ea132c2106ac75 Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
…obs, yarn_application_ids) in DiagnoseClusterRequest (#560) * feat: add optional parameters (tarball_gcs_dir, diagnosis_interval, jobs, yarn_application_ids) in DiagnoseClusterRequest PiperOrigin-RevId: 565501215 Source-Link: googleapis/googleapis@6b95655 Source-Link: googleapis/googleapis-gen@caf4b28 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiY2FmNGIyOGY3NTIyZWYyMWJjYzAwNmJjYjhjOWI2Y2Q2ZDIyMzFjNCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
* feat: Add client library support for AssetService v1 AnalyzeOrgPolicies API feat: Add client library support for AssetService v1 AnalyzeOrgPolicyGovernedContainers API feat: Add client library support for AssetService v1 AnalyzeOrgPolicyGovernedAssets API PiperOrigin-RevId: 520696122 Source-Link: googleapis/googleapis@fb446a2 Source-Link: googleapis/googleapis-gen@f4b9936 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjRiOTkzNjQwM2ZhZjg0NzE4MGEzNTM2MzZiZTUxNWQyMWQ1Y2FjNCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
* docs: Minor formatting chore: Update gapic-generator-python to v1.11.5 build: Update rules_python to 0.24.0 PiperOrigin-RevId: 563436317 Source-Link: googleapis/googleapis@42fd37b Source-Link: googleapis/googleapis-gen@280264c Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjgwMjY0Y2EwMmZiOTMxNmI0MjM3YTk2ZDBhZjFhMjM0M2E4MWE1NiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: Added support for retriggering notifications in AlertPolicy feat: Added support for forecast options in AlertPolicy feat: Added support for promQL condition type in AlertPolicy PiperOrigin-RevId: 564411592 Source-Link: googleapis/googleapis@babab51 Source-Link: googleapis/googleapis-gen@b282e01 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjI4MmUwMTJkYjBmMDAzNmJmZjIyMzAwZDNmYzEwMWQyNThiYWNhNyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
This involves changes in all documentation, renaming a module
and a test module, and updating the calls and variable names in
a regression test module.
Addresses #544.
See https://github.com/dhermes/gcloud-python/tree/fix-544-many-commits for a more digestible version of these commits (though it's still not very digestible).
To "check" I was finished I manually inspected the output of "git grep -i key".