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

Styling of yaml files #426

Closed
2 tasks
hmgaudecker opened this issue Jan 18, 2023 · 4 comments · Fixed by #427
Closed
2 tasks

Styling of yaml files #426

hmgaudecker opened this issue Jan 18, 2023 · 4 comments · Fixed by #427
Assignees

Comments

@hmgaudecker
Copy link
Member

hmgaudecker commented Jan 18, 2023

Current situation

Consistent styling is helpful for many reasons. Also applies to yaml files, particularly when comparing settings across projects.

Styling of yaml files is ad-hoc.

Desired Situation

Style yaml files automatically.

Proposed implementation

Add yamlfix and yamllint hooks as described here , fix settings so that it they work in estimagic.

Based on this conversation, I had been under the impression that these were added in #420, but they did not appear.

Adding them is not fully trivial. Reasons AFAICT:

  • Fix settings of yamlfix so that yamllint does not complain when test files are changed.
  • Align the output of .envs/update_envs.py with what yamlfix will do (e.g., six spaces for the pip-installed packages, align settings yamlfix/yamllint for inline comments)
@janosg
Copy link
Member

janosg commented Jan 18, 2023

I also thought it was done as part of #420. @timmens can you have a look when you are back? It is not urgent!

@timmens
Copy link
Member

timmens commented Jan 18, 2023

Thank you for noticing this @hmgaudecker. Yes, this should've been added in #420. I should've been more careful when messing around in someone else's PR while not fully understanding what's going on.

I will take care of this issue once I'm back in the office.

@hmgaudecker
Copy link
Member Author

No worries! Happy to look into a PR together, but no rush.

@hmgaudecker
Copy link
Member Author

I just pushed the yaml-linting branch. I already added the hooks and ran them on files that don't cause issues.

The two items from the to-do list above are still open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants