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

protodoc: Use jinja2 for rendering proto docs #15352

Merged
merged 1 commit into from
Mar 8, 2021

Conversation

phlax
Copy link
Member

@phlax phlax commented Mar 7, 2021

Commit Message: protodoc: Use jinja2 for rendering proto docs
Additional Description:
Risk Level:
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue] Partial fix for #15351
[Optional Deprecated:]
[Optional API Considerations:]

@repokitteh-read-only
Copy link

CC @envoyproxy/dependency-shepherds: Your approval is needed for changes made to (bazel/.*repos.*\.bzl)|(bazel/dependency_imports\.bzl)|(api/bazel/.*\.bzl)|(.*/requirements\.txt)|(.*\.patch).

🐱

Caused by: #15352 was opened by phlax.

see: more, trace.

@repokitteh-read-only repokitteh-read-only bot added the deps Approval required for changes to Envoy's external dependencies label Mar 7, 2021
@phlax phlax marked this pull request as draft March 7, 2021 10:37
Signed-off-by: Ryan Northey <ryan@synca.io>
@phlax phlax force-pushed the protodoc-jinja2 branch from 523768b to ae54c29 Compare March 7, 2021 12:57
@phlax phlax changed the title [WIP] protodoc: Use jinja2 for rendering proto docs protodoc: Use jinja2 for rendering proto docs Mar 7, 2021
@phlax phlax marked this pull request as ready for review March 7, 2021 13:38
@phlax
Copy link
Member Author

phlax commented Mar 7, 2021

/retest

@repokitteh-read-only
Copy link

Retrying Azure Pipelines:
Retried failed jobs in: envoy-presubmit

🐱

Caused by: a #15352 (comment) was created by @phlax.

see: more, trace.

@phlax
Copy link
Member Author

phlax commented Mar 7, 2021

this PR only adds jinja and moves the current explicit templates

i think we could go quite a bit further, but i think this is a good start

@moderation
Copy link
Contributor

/lgtm deps

@repokitteh-read-only repokitteh-read-only bot removed the deps Approval required for changes to Envoy's external dependencies label Mar 7, 2021
@moderation
Copy link
Contributor

Looks good and @htuch should take a quick look

Copy link
Member

@htuch htuch left a comment

Choose a reason for hiding this comment

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

Thanks, much cleaner!

indent = " " * indent
formatted_list = "\n".join(f"{indent}- :ref:`{ext} <{prefix}_{ext}>`" for ext in items)
return f"{formatted_list}\n{indent}\n"
return EXTENSION_TEMPLATE.render(extension=extension,
Copy link
Member

Choose a reason for hiding this comment

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

There are probably a ton of other cleanup possibilities in this file. Would you prefer to leave them as TODOs?

Copy link
Member Author

Choose a reason for hiding this comment

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

yep - for now i think yes - im happy to follow up tho

Copy link
Member Author

Choose a reason for hiding this comment

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

i updated the PR to "partial fix for.," so we keep the sphinx ticket open once this lands

@dio dio assigned htuch Mar 8, 2021
Copy link
Member

@htuch htuch left a comment

Choose a reason for hiding this comment

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

/lgtm deps
LGTM, thanks!

@htuch htuch merged commit 51db799 into envoyproxy:main Mar 8, 2021
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.

3 participants