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

Detail generating code in the Readme #54

Conversation

elliotmjackson
Copy link
Contributor

#48 highlights there may be some documentation gap in generating code, I propose a detailed generating code section to combat this

@elliotmjackson elliotmjackson marked this pull request as ready for review August 8, 2023 16:25
# <snip>
plugins:
- plugin: buf.build/protocolbuffers/python:v23.4
out: gen
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesn't this need an option to generate included protos too?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

README.md Outdated Show resolved Hide resolved
README.md Outdated
@@ -71,6 +80,81 @@ message Transaction {
}
```

### Generating Code
Copy link
Member

@jhump jhump Aug 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels a longer-winded than necessary. I definitely wouldn't suggest people experiment with both buf and protoc 😛

Instead of a whole section about this, just make it clear above that to use the runtime library after pip install, they also need to generate the Python code for the core buf.protovalidate Protobuf package, and provide examples using buf. (I would leave protoc as an exercise for the reader: after all, very few people using protoc use it directly but usually have their own tooling around it or maybe use bazel.)

With buf, you can suggest that using --include-imports flag will probably do what they need or suggest they separately run buf generate buf.build/bufbuild/protovalidate.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hows 62a6014?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better. Ship it!!

@elliotmjackson elliotmjackson merged commit 2eee9ba into main Aug 14, 2023
4 checks passed
@elliotmjackson elliotmjackson deleted the ejackson/tcn-2174-protovalidate-python48-question-how-to-install branch August 14, 2023 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants