optimagic-dev / optimagic

optimagic is a Python package for numerical optimization. It is a unified interface to optimizers from SciPy, NlOpt and other packages. optimagic's minimize function works just like SciPy's, so you don't have to adjust your code. You simply get more optimizers for free. On top you get diagnostic tools, parallel numerical derivatives and more.
https://optimagic.readthedocs.io/
MIT License
270 stars 30 forks source link

Styling of yaml files #426

Closed hmgaudecker closed 1 year ago

hmgaudecker commented 1 year ago

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:

janosg commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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

hmgaudecker commented 1 year ago

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.