-
Notifications
You must be signed in to change notification settings - Fork 653
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
Script to regenerate proto code + pyi stubs #823
Conversation
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.
nice!
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.
Change looks good, it looks like the protos were regenerated as part of the change, if so it would be good to updated the changelog for 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.
Looking great, it would be great to merge this into the tox directive for opentelemetry-proto
.
As discussed in the SIG meeting, added a const PROTO_REPO_BRANCH_OR_COMMIT, a commit/branch/tag in opentelemetry-proto repo to build from. When you are ready to pull in changes from upstream proto defs, just update the const, rebuild, and fix errors in OTLP exporter.
As discussed in the SIG meeting, added a const |
@codeboten changelog updated |
Closes #792, closes #793
scripts/proto_codegen.sh
to regenerate the python code from proto files in the opentelemetry-proto repo. It does a fresh pull (or clone if needed) each time you build so just run the script to get updates from the other repo. Let me know if the script should be in a different place..pyi
stub files. This gives type hints for the strange code the protoc generates so tooling and mypy can make sense of it..gitattributes
pattern for the generated code so you don't have to scroll through it (unless you want to 😄 )MANIFEST.in
so it will pull in the pyi files.