Skip to content

yamlfix all yaml files; add yamlfix to the pre-commit hook#551

Merged
johnjasa merged 14 commits intoNatLabRockies:developfrom
johnjasa:add_yamlfix
Feb 26, 2026
Merged

yamlfix all yaml files; add yamlfix to the pre-commit hook#551
johnjasa merged 14 commits intoNatLabRockies:developfrom
johnjasa:add_yamlfix

Conversation

@johnjasa
Copy link
Collaborator

yamlfix all yaml files; add yamlfix to the pre-commit hook

We have pretty enforced standards for Python code and a codebase that heavily relies on .yaml file inputs.
I suggest we lint-and-fix .yaml files as part of our pre-commit hook using yamlfix.
It's an opinionated auto-formatter but does have some configurability.

Section 1: Type of Contribution

  • Other (please describe): Formatting standardization

Section 2: Type of Reviewer Feedback Requested

My suggested actions for folks to assess this change:

  • see the Files Changed tab to get a feel for what yamlfix'd files look like
  • look at the configuration options for yamlfix here
  • decide if you like, dislike, or don't really care about different yaml options

Section 3: General PR Checklist

  • PR description thoroughly describes the new feature, bug fix, etc.
  • Added tests for new functionality or bug fixes
  • Tests pass (If not, and this is expected, please elaborate in the Section 6: Test Results)
  • Documentation
    • Docstrings are up-to-date
    • Related docs/ files are up-to-date, or added when necessary
    • Documentation has been rebuilt successfully
    • Examples have been updated (if applicable)
  • CHANGELOG.md has been updated to describe the changes made in this PR

Section 3: Related Issues

Resolves #547 and then some

Section 4: Impacted Areas of the Software

All YAML files.

@johnjasa johnjasa requested a review from RHammond2 February 26, 2026 06:27
Copy link
Collaborator

@RHammond2 RHammond2 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 amazing, I wish I knew about this library before! Only one of these changes are required, but I would recommend all the changes suggested in the pyproject.toml.

Copy link
Collaborator

@RHammond2 RHammond2 left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks for finding this and applying it!

FYI, the quote_representation functionality to use double quotes is malfunctioning, so I've commented it out with a note to check back in on the open issue for it. Otherwise, it seems that a couple files were left with incomplete reformatting, so I've just gone and rerun the whole workflow so the pre-commit action doesn't block the PR.

@johnjasa johnjasa merged commit b9db880 into NatLabRockies:develop Feb 26, 2026
5 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.

2 participants