-
Notifications
You must be signed in to change notification settings - Fork 45
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
DOCS-1088: Document more of the cloud API #1814
Conversation
Overall readability score: 54.78 (🟢 +0.08)
View detailed metrics🟢 - Shows an increase in readability
Averages:
View metric targets
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple typos and clarity suggestions. Thank you for taking this on!!
|
||
### UpdateLocation | ||
|
||
Change the name of a {{< glossary_tooltip term_id="location" text="parent location" >}} and/or assign it a new location. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if it's ok to use and/or generally with current style guidance, but I can't think of a better way to phrase it 😆 So my thought is it's ok?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I had the same thought :D So I just left it as it was in the Python docs
- [(viam.proto.app.Location)](https://python.viam.dev/autoapi/viam/proto/app/index.html#viam.proto.app.Location): The newly updated location. | ||
|
||
```python {class="line-numbers linkable-line-numbers"} | ||
# The following line takes the location with ID "abc12abcde" and moves it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# The following line takes the location with ID "abc12abcde" and moves it | |
# The following line takes the location with ID "abc12abcde" and moves it to be a sub-location of the location with ID "xyz34xxxxx" |
(opt) Would put this all on one line myself bc I personally think it looks better, but highly highly optional
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I'll leave as-is because on narrow screens it will become quite wide. However, maybe I should split the parameters onto multiple lines as well now that I look at it...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(done splitting BTW)
|
||
```python {class="line-numbers linkable-line-numbers"} | ||
# The following line takes the location with ID "abc12abcde" and moves it | ||
# to be a sub-location of the location with ID "xyz34xxxxx" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# to be a sub-location of the location with ID "xyz34xxxxx" |
|
||
**Parameters:** | ||
|
||
- `location_id` [(string)](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str): ID of the location to delete. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- `location_id` [(string)](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str): ID of the location to delete. | |
- `location_id` [(string)](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str): ID of the location. |
(opt)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possibly superfluous but leaving as-is just to make sure they get it and don't somehow think it's the parent location or some such, and because this is a very short description anyway so I'm not too worried about verbosity here.
|
||
**Returns:** | ||
|
||
- [(viam.proto.app.Location)](https://python.viam.dev/autoapi/viam/proto/app/index.html#viam.proto.app.Location): The location corresponding to the provided ID. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- [(viam.proto.app.Location)](https://python.viam.dev/autoapi/viam/proto/app/index.html#viam.proto.app.Location): The location corresponding to the provided ID. | |
- [(Location)](https://python.viam.dev/autoapi/viam/proto/app/index.html#viam.proto.app.Location): The location corresponding to the provided ID. |
I'm actually not super sure if this is best but generally bc they're using this package I would remove the rest of the import, as they won't really need it to understand their code and it's linked
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm docs writing wise and code sample wise, would suggest getting another approval from Andrew or Naomi
|
||
### LocationAuth | ||
|
||
Get a location’s `LocationAuth` (location secret or secrets). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Get a location’s `LocationAuth` (location secret or secrets). | |
Get a location’s location secret by ID. |
Sorry, I know I approved already, but I think specifying by ID in description is good and would remove parenthesis. Optional but strongly suggest
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm the LocationAuth isn't just the location secret; it also contains location ID and secret IDs. How about this
Get a location’s `LocationAuth` (location secret or secrets). | |
Get a location’s authentication information by location ID. |
docs/program/apis/cloud.md
Outdated
- None | ||
|
||
```python {class="line-numbers linkable-line-numbers"} | ||
# Replace string with a valid location ID |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there are a lot of fake location IDs in here but I don't think this advisory comment appears in all of them. Would it make sense to either remove it here, or add it everywhere else that we have a fake location_id?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're not wrong; I should probably just remove them all
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed them all!
Co-authored-by: Sierra Guequierre <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One small thing (no need to rerequest review) otherwise lgtm!
You can view a rendered version of the docs from this PR at https://docs-test.viam.dev/bece4aadcb1873bc7ff4a57da6bc020468d3df23/public |
Code examples have all been tested (with valid strings of course)