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

[components] Update docs commenting logic #27162

Open
wants to merge 1 commit into
base: 01-15-_components_update_resolution_deferral_logic
Choose a base branch
from

Conversation

OwenKephart
Copy link
Contributor

Summary & Motivation

This simplifies the docs commenting logic by re-using the source-position loader. In essence, we dump the yaml, then parse it again so we can map the values to source positions, then emit comments on lines where we need to.

This is a lot easier to build off of and less sketchy than the previous implementation.

How I Tested These Changes

Changelog

NOCHANGELOG

Copy link
Contributor Author

OwenKephart commented Jan 16, 2025

@@ -26,8 +26,8 @@ def test_generate_sample_yaml():

params:
sub_scoped: # Available scope: {'outer_scope'}
str_field: '...'
int_field: 0
str_field: '...' # Available scope: {'outer_scope'}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

it was actually a bug that these comments weren't showing up before

in terms of desired behavior, the previous output might actually have been nicer but now it's much easier to choose which way we want this to appear

@OwenKephart OwenKephart force-pushed the 01-15-_components_update_resolution_deferral_logic branch from 6bd100f to 46d40ae Compare January 16, 2025 16:47
@OwenKephart OwenKephart force-pushed the 01-15-_components_update_docs_commenting_logic branch from aeb1eec to 00bac33 Compare January 16, 2025 16:47
@OwenKephart OwenKephart force-pushed the 01-15-_components_update_resolution_deferral_logic branch from 46d40ae to 4d52208 Compare January 16, 2025 19:31
@OwenKephart OwenKephart force-pushed the 01-15-_components_update_docs_commenting_logic branch from 00bac33 to d4b4c59 Compare January 16, 2025 19:31
@OwenKephart OwenKephart force-pushed the 01-15-_components_update_resolution_deferral_logic branch from 4d52208 to d3411b7 Compare January 16, 2025 19:35
@OwenKephart OwenKephart force-pushed the 01-15-_components_update_docs_commenting_logic branch from d4b4c59 to f81a367 Compare January 16, 2025 19:35
@OwenKephart OwenKephart force-pushed the 01-15-_components_update_resolution_deferral_logic branch 2 times, most recently from 1803966 to 3d10ad3 Compare January 16, 2025 20:12
@OwenKephart OwenKephart force-pushed the 01-15-_components_update_docs_commenting_logic branch from f81a367 to 731e9fd Compare January 16, 2025 20:12
Copy link
Member

@benpankow benpankow left a comment

Choose a reason for hiding this comment

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

this is way nicer 👏

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.

2 participants