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

Adding more multiline string support #110

Merged
merged 3 commits into from
Feb 12, 2024
Merged

Adding more multiline string support #110

merged 3 commits into from
Feb 12, 2024

Conversation

schuylermartin45
Copy link
Collaborator

@schuylermartin45 schuylermartin45 commented Feb 6, 2024

The recipe parser now properly handles multiline strings when | and > (plus +/-) variants are used. Previously the parser only supported the | character.

The bulk of this PR includes additional unit testing.

I also took the time to sort the top-level YAML keys in a "canonical" order.

See commits for additional details.

@schuylermartin45
Copy link
Collaborator Author

The build-recipe failure is a known issue in conda-build that I'm not worrying about at this time.

@schuylermartin45
Copy link
Collaborator Author

@wolfv The last commit has that sorting we talked about earlier today, if you were curious ^

- Expands support past the `|` character to include the 6 common variants
  found in our recipe files (`|`, `|+`, `|-`, `>`, `>+`, `>-`)
  - For our purposes, the meaning of these symbols is not super important for
    parsing and rendering the YAML files. The next commit will ensure returning
    the multiline string works as expected per symbol.
- Adds unit tests
- Multiline strings are now interpreted correctly in `get_value()` and
  `render_to_object()`
- Multiline strings containing JINJA substitutions will now correctly
  subsitute those values
- Adds more unit tests, including some missing coverage of edge cases
- This should mask any "odd" orderings caused by the patch operations required
  to switch to the new format.
- Ordering follows a "canonical" sorting. This is what most recipe builders are
  comfortable and used to seeing.
- Ordering was a group effort in our Conda Build Tools chatroom
@schuylermartin45 schuylermartin45 merged commit bac7f56 into main Feb 12, 2024
3 checks passed
@schuylermartin45 schuylermartin45 deleted the smartin_PAT-25 branch February 12, 2024 18:30
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