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

Implement a custom format parser #271

Merged
merged 2 commits into from
Oct 10, 2023

Conversation

douglasjacobsen
Copy link
Collaborator

This merge is a major change to ramble's expander logic. Previously, we relied heavily on Python's f-string format syntax. This causes issues related to formatting template files (like json and yaml), and prevents some usecases (such as in-line variable definitions).

This change adds a custom parser for processing strings while they are being expanded.

@douglasjacobsen douglasjacobsen added the enhancement New feature or request label Oct 3, 2023
@douglasjacobsen douglasjacobsen requested a review from rfbgo October 3, 2023 19:39
@douglasjacobsen douglasjacobsen force-pushed the custom_formatter branch 3 times, most recently from 026c18e to cd82c13 Compare October 3, 2023 20:18
@douglasjacobsen douglasjacobsen marked this pull request as draft October 3, 2023 20:45
@douglasjacobsen douglasjacobsen force-pushed the custom_formatter branch 2 times, most recently from c7ac48e to 8cd6005 Compare October 4, 2023 21:47
@douglasjacobsen douglasjacobsen marked this pull request as ready for review October 4, 2023 22:01
rfbgo
rfbgo previously approved these changes Oct 5, 2023
lib/ramble/ramble/expander.py Outdated Show resolved Hide resolved
lib/ramble/ramble/expander.py Outdated Show resolved Hide resolved
lib/ramble/ramble/expander.py Outdated Show resolved Hide resolved
lib/ramble/ramble/expander.py Outdated Show resolved Hide resolved
lib/ramble/ramble/expander.py Outdated Show resolved Hide resolved
This commit is a major change to ramble's expander logic. Previously, we
relied heavily on Python's f-string format syntax. This causes issues
related to formatting template files (like json and yaml), and prevents
some usecases (such as in-line variable definitions).

This change adds a custom parser for processing strings while they are
being expanded.
@rfbgo rfbgo merged commit b1d84b4 into GoogleCloudPlatform:develop Oct 10, 2023
@douglasjacobsen douglasjacobsen deleted the custom_formatter branch January 26, 2024 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants