Skip to content
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

Add missing viam module create step in hello world module docs #3744

Closed

Conversation

Abalaxy
Copy link
Member

@Abalaxy Abalaxy commented Dec 9, 2024

Was going through the Create a Hello World module doc and discovered that the viam module create step was missing, but that it was present in the dedicated Upload a module to the Viam Registry doc. Added in that information, for both Python and Go, and updated the language in the existing steps to be consistent with the change.

Screenshots:
Screenshot 2024-12-09 at 5 25 31 PM
Python

Screenshot 2024-12-09 at 5 25 37 PM
Go

@viambot viambot added the safe to build This pull request is marked safe to build from a trusted zone label Dec 9, 2024
@viambot
Copy link
Member

viambot commented Dec 9, 2024

You can view a rendered version of the docs from this PR at https://docs-test.viam.dev/3744

@michaellee1019
Copy link
Member

michaellee1019 commented Dec 9, 2024

Hey @Abalaxy I see there is viam module generate instructions on https://docs.viam.com/how-tos/hello-world-module/#generate-stub-files. I think that is why there is no create below. Behind the scenes generate will also run create. Unless something isn't working right.

@michaellee1019
Copy link
Member

michaellee1019 commented Dec 9, 2024

In my exploring I also saw there were two similar how-tos for creating a module. Should there be only one?
https://docs.viam.com/how-tos/hello-world-module/
https://docs.viam.com/how-tos/create-module/

@JessamyT
Copy link
Collaborator

JessamyT commented Dec 9, 2024

My understanding is that using Register module: Yes when prompted by the CLI module generator would indeed register the module. If a user said Register module: No, that's when they'd need to run viam module create, but that's outside the scope of this particular doc.

In my exploring I also saw there were two similar how-tos for creating a module. Should there be only one? https://docs.viam.com/how-tos/hello-world-module/ https://docs.viam.com/how-tos/create-module/

These two docs serve two different purposes: The hello world guide is more prescriptive and provides less information. It's also only for Python and Go. The more general create a module guide provides more details and generalized guidance, and includes C++ information. Currently, there's also the Create a Python Sensor Module guide, which has overlap as well. The docs IA is changing, and with those changes we'll be modifying some of this content.

@Abalaxy
Copy link
Member Author

Abalaxy commented Dec 10, 2024

Hey @Abalaxy I see there is viam module generate instructions on https://docs.viam.com/how-tos/hello-world-module/#generate-stub-files. I think that is why there is no create below. Behind the scenes generate will also run create. Unless something isn't working right.

Aggghhh, I missed switching that to Yes! I had the "Generate the sensor code" section open as well and read that and conflated the two, because that section says to set it to No (which is correct for that call, but not the first one). Good catch, nevermind then 🤦

@Abalaxy Abalaxy closed this Dec 10, 2024
@JessamyT
Copy link
Collaborator

I’m sorry! I’m realizing the instructions to set it to Yes may have been updated only after you first encountered this page, because I did indeed erroneously have it set to No in a previous version. You were actually onto something before my other PR merged. Thank you so much for your efforts in any case.

@Abalaxy
Copy link
Member Author

Abalaxy commented Dec 10, 2024

I’m sorry! I’m realizing the instructions to set it to Yes may have been updated only after you first encountered this page, because I did indeed erroneously have it set to No in a previous version. You were actually onto something before my other PR merged. Thank you so much for your efforts in any case.

No worries at all! Now I know how to make changes to the docs, so it was a useful exercise!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
safe to build This pull request is marked safe to build from a trusted zone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants