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

Add !dict and !list UW YAML tags #682

Merged
merged 13 commits into from
Jan 7, 2025

Conversation

elcarpenterNOAA
Copy link
Collaborator

Synopsis

Fixes #676.

  • Adds support for !dict and !list UW YAML tags.
  • Expands evaluation of !bool tag to Python's truthiness standards.

Type

  • Enhancement (adds new functionality)

Impact

  • This is a non-breaking change (existing functionality continues to work as expected)

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.

@elcarpenterNOAA elcarpenterNOAA self-assigned this Dec 27, 2024
docs/sections/user_guide/yaml/tags.rst Outdated Show resolved Hide resolved
src/uwtools/config/support.py Outdated Show resolved Hide resolved
src/uwtools/tests/config/test_jinja2.py Show resolved Hide resolved
src/uwtools/tests/config/test_jinja2.py Show resolved Hide resolved
src/uwtools/tests/config/test_support.py Show resolved Hide resolved
Copy link
Collaborator

@NaureenBharwaniNOAA NaureenBharwaniNOAA left a comment

Choose a reason for hiding this comment

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

Looking good! Just one comment on ordering.

src/uwtools/tests/config/formats/test_base.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@maddenp-noaa maddenp-noaa left a comment

Choose a reason for hiding this comment

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

Looks great. Just a handful of minor comments.

docs/sections/user_guide/yaml/tags.rst Outdated Show resolved Hide resolved
docs/sections/user_guide/yaml/tags.rst Outdated Show resolved Hide resolved
src/uwtools/tests/config/formats/test_base.py Outdated Show resolved Hide resolved
src/uwtools/tests/config/test_support.py Show resolved Hide resolved
src/uwtools/tests/config/test_support.py Outdated Show resolved Hide resolved
elcarpenterNOAA and others added 3 commits January 2, 2025 15:16
* WIP

* ScalarNode -> Node

* Simplify

* Simplify

* Simplify

* Update docstring

* WIP

* WIP

* Revert UWYAMLTag class hierarchy

* Revert unnecessary class change

* Rename function

* WIP

* convert() -> @Property convert

* WIP

* Tests pass

* Improve test-function names

* Improve test-function names

* Unit tests @ 100%

* Doc updates

* Simplify

* Update notebooks

* Revert change to pyproject.toml

* Remove commented-out breakpoint

* Update

* Improve non-str hint

* Improve non-str hint

* Doc update

* Custom UWYAMLConvert __repr__()
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.

Just a few comments below. No changes necessary, just some curiosities.

src/uwtools/config/formats/base.py Show resolved Hide resolved
src/uwtools/config/support.py Outdated Show resolved Hide resolved
src/uwtools/tests/config/test_support.py Show resolved Hide resolved
@elcarpenterNOAA elcarpenterNOAA merged commit 609e71c into ufs-community:main Jan 7, 2025
2 checks passed
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.

Add !list and !dict UW YAML tags
4 participants