GeezerVison is showing github.com — [Documentation Issue] Public properties are not listed in documentation · Issue #1835 · googleapis/google-cloud-python
[Documentation Issue] Public properties are not listed in documentation #1835DescriptionPage Name: pubsub-subscription
Release: 0.14.0
Though the name, topic, ack_deadline and push_endpoint properties are public properties of the subscription object, this is not shown anywhere in the documentation. It is very _Pythonic_ to expose constructor properties as public properties but notating as such in the documentation would be helpful.
The same can be said for topic objects. Reacted by Tim Sweña (Swast) Activitydhermes commented on Jun 7, 2016 @tseaver What's the cause here? Are these properties just data attributes, or do they have @property? Also, if they are just data attributes, does Sphinx have an Attributes section we could use in the class doc? tseaver commented on Jun 7, 2016 Defined via @property: the docstrings for the resulting descriptors are copied from their getters. tseaver commented on Jun 7, 2016 Oops, I spoke in haste/error: name, topic, ack_deadline, and push_endpoint are not properties. To fix this, we would need to do one of two things:
- Make them properties, backed by private attributes.
- Give them class-level default values with their own docstrings.
dhermes commented on Jun 7, 2016 tseaver commented on Jun 7, 2016 dhermes commented on Jun 7, 2016 Wow I didn't realize we could even provide instance attribute docstrings in __init__! ensonic commented on Feb 21, 2017 Friendly ping.
dir(topic)
['__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_client', '_require_client', '_timestamp_message', 'batch', 'check_iam_permissions', 'create', 'delete', 'exists', 'from_api_repr', 'full_name', 'get_iam_policy', 'list_subscriptions', 'name', 'project', 'publish', 'set_iam_policy', 'subscription', 'timestamp_messages']
but still not covered in https://googlecloudplatform.github.io/google-cloud-python/stable/pubsub-topic.html lukesneeringer commented on Apr 19, 2017 We are in the process of working on a pretty significant change to this API, so for now I would prefer not shore up docs that we are about to need to change anyway.
I will ensure that the documentation is complete in the rehash. dhermes commented on Apr 19, 2017 @lukesneeringer We should probably re-open a "sub-issue" here, namely the idea that class attributes should be documented (especially if they aren't @property-s or constructor arguments)
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|