-
Notifications
You must be signed in to change notification settings - Fork 46
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-2691: Add Create a Sensor Module how-to #3259
Conversation
docs/use-cases/sensor-module.md
Outdated
|
||
{{< /expand >}} | ||
|
||
Run your test script from your command line and make sure you are able to get readings from the sensor before proceeding. |
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.
Run your test script from your command line and make sure you are able to get readings from the sensor before proceeding. | |
Run your test script from your command line interface and make sure you are able to get readings from the sensor before proceeding. |
I think?
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 believe a "CLI" is something you interface with from within the terminal, such as the Viam CLI. I will change this to "terminal window" or "terminal" because that seems to be more general, whereas "command prompt" is more Windows-based.
docs/use-cases/sensor-module.md
Outdated
|
||
## Generate boilerplate module code | ||
|
||
You need some boilerplate files to make your module. |
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.
this might be hard to understand without knowing what boilerplate means, maybe simple explanation of term?
docs/use-cases/sensor-module.md
Outdated
1. When prompted for a model triplet, use `<your organization public namespace>:<repo name>:<what you want to call your sensor model>`. | ||
For example, `jessamy:weather:meteo_PM`. | ||
|
||
- You can find your organization namespace by going to your organization settings in the [Viam app](https://app.viam.com). |
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.
might need more explanation, idk what to do in organization settings. Or is that next bullet point?
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 thought about this, but since nowadays we're erring on the side of less verbosity, if someone can figure out how to write a module I trust them to find this with a gesture in the right direction. I think clicking the name of their org, and then clicking "settings", is intuitive enough if they know they're looking for organization settings.
docs/use-cases/sensor-module.md
Outdated
{{< expand "Example sensor module README" >}} | ||
|
||
````md | ||
# meteo_PM modular component |
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.
# meteo_PM modular component | |
# `meteo_PM` modular component |
docs/use-cases/sensor-module.md
Outdated
|
||
To use this module, follow these instructions to [add a module from the Viam Registry](https://docs.viam.com/registry/configure/#add-a-modular-resource-from-the-viam-registry) and select the `rdk:sensor:jessamy:weather:meteo_PM` model from the [`jessamy:weather:meteo_PM` module](https://app.viam.com/module/rdk/jessamy:weather:_PM). | ||
|
||
## Configure your meteo_PM sensor |
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.
## Configure your meteo_PM sensor | |
## Configure your `meteo_PM` sensor |
I don't have the time to go through this in detail today unfortunately.
|
ae128d8
to
bc38515
Compare
docs/how-tos/sensor-module.md
Outdated
For example, `jessamy:weather:meteo_PM`. | ||
|
||
- You can find your organization namespace by going to your organization settings in the [Viam app](https://app.viam.com). | ||
- The repo name (family name) is the name of the GitHub repo where you will put your module code. |
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 repo name (family name) is the name of the GitHub repo where you will put your module code. | |
- The repo name (also used as family name) is generally the name of the GitHub repo where you will put your module code. |
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.
We say repo name elsewhere in the docs, but the generator says family name. What exactly does "also used as" mean here?
docs/how-tos/sensor-module.md
Outdated
|
||
It's a good idea to test your module locally before uploading it to the [Viam registry](https://app.viam.com/registry): | ||
|
||
1. Follow [the local module testing instructions](/how-tos/create-module/#test-your-module-locally) to configure your local module and then the associated model on your machine. |
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 those steps are so small state you can include them directly, maybe in slightly shortened form
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 content is very good. I do think there is value in conforming to the how-to template for this. I don't want this to merge without conforming to the template. And I don't know that we'll be able to make a decision on a new formatting quickly. I think I'd like to see where the formatting fails before we make a decision on moving away from the format.
The create a module and the update and manage modules page don't conform to it but I think that's because we still have work to do on them. For this how-to I don't see why the format shouldn't work right now.
89a5e0e
to
5528015
Compare
docs/how-tos/sensor-module.md
Outdated
{{< /expand >}} | ||
{{% /tablestep %}} | ||
{{% tablestep %}} | ||
**2. Run your test script** |
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 can if you want to skip having steps for this part. I agree that here it feels a bit unnecessary. In the rest it's more helpful. Up to you.
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.
Sorry i'm not sure what this comment is in relation to
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'm saying you don't need to put tablesteps here into the "Start with a test script" section if you don't want to
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.
oooh
docs/how-tos/sensor-module.md
Outdated
{{% tablestep %}} | ||
**1. Install and run the module generator** | ||
|
||
Follow the steps in the [readme](https://github.com/viam-labs/generator-viam-module/tree/main) to install the generator and run 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.
Given the instruction can be one command to run I don't see a reason to direct them to the readme. It's better if we keep them on one page
Follow the steps in the [readme](https://github.com/viam-labs/generator-viam-module/tree/main) to install the generator and run it. | |
The following commands will install a module generator [generator-viam-module](https://github.com/viam-labs/generator-viam-module/tree/main). | |
You must have node 16 or newer installed. | |
npm install -g yo generator-viam-module | |
Then run the generator with: | |
yo viam-module |
docs/how-tos/sensor-module.md
Outdated
|
||
{{< table >}} | ||
{{% tablestep %}} | ||
**1. Install and run the module generator** |
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.
**1. Install and run the module generator** | |
**1. Install the module generator** |
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.
A few minor things then I think this is ready for merge
Co-authored-by: Naomi Pentrel <[email protected]>
Co-authored-by: Naomi Pentrel <[email protected]>
Co-authored-by: Naomi Pentrel <[email protected]>
24a7ab8
to
7cdf645
Compare
Co-authored-by: Naomi Pentrel <[email protected]>
You can view a rendered version of the docs from this PR at https://docs-test.viam.dev/3259 |
https://docs-test.viam.dev/3259/how-tos/sensor-module/