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

GH-406 #407

Merged
merged 7 commits into from
Feb 7, 2024
Merged

GH-406 #407

merged 7 commits into from
Feb 7, 2024

Conversation

maddenp-noaa
Copy link
Collaborator

@maddenp-noaa maddenp-noaa commented Feb 6, 2024

Synopsis

Fix bug that stripped whitespace from lines of an atparse input when translating to Jinja2. Fixes #406.

Demo:

% cat atparse
@[first_entry]
  @[second_entry]
  @[third_entry]
    @[fourth_entry]

        @[fifth entry]
% cat atparse | uw template translate
{{ first_entry }}
  {{ second_entry }}
  {{ third_entry }}
    {{ fourth_entry }}

        {{ fifth entry }}

Type

  • Bug fix (corrects a known issue)

Impact

  • This is a breaking change (changes existing functionality)

Checklist

  • I have added myself and any co-authors to the PR's Assignees list.
  • I have reviewed the documentation and have made any updates necessitated by this change.

Copy link
Contributor

@WeirAE WeirAE left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@christinaholtNOAA christinaholtNOAA left a comment

Choose a reason for hiding this comment

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

LGTM. Just a few curious questions below.

src/uwtools/config/atparse_to_jinja2.py Outdated Show resolved Hide resolved
Copy link
Contributor

@benjamin-cash benjamin-cash left a comment

Choose a reason for hiding this comment

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

Spot checks with the various ufs config files produces the expected formats, looks good to me!

@maddenp-noaa
Copy link
Collaborator Author

Thanks for testing and for the report, @benjamin-cash.

@maddenp-noaa maddenp-noaa merged commit bd64cb0 into ufs-community:main Feb 7, 2024
2 checks passed
@maddenp-noaa maddenp-noaa deleted the GH-406 branch February 7, 2024 17:35
@maddenp-noaa maddenp-noaa added the bug Something isn't working label Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

translate does not preserve indentation
4 participants