You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to add a flag to fully expand merges and anchors? This tool is great for "rendering" complex .yaml setups and this feature would replace another yaml tool that I'm using to do this expansion.
this behavior is featured in the ruamel.yaml library (python) $ yaml merge-expand input.yaml output.yaml
Example input:
sitename: website
default: &DEFAULT
URL: {{sitename}}.com
mode: production
site_name: Website
some_setting: h2i8yiuhef
some_other_setting: 3600
development:
<<: *DEFAULT
URL: {{sitename}}.local
mode: dev
test:
<<: *DEFAULT
URL: test.{{sitename}}.qa
mode: test
Thanks for the feedback! 👍 To be honest, I'm really surprised that this tool was useful to anyone other than me! 😮 You are the first known user, congratulations! 🎉
I quickly wrote it, during the development of more complex tools at my main job, then I posted it in open source (since there is nothing secret in this), but I did not plan to develop it, because the my tasks changed. Now, 2 years later, it will be necessary to remember how everything works there 😄
I like your suggestion - I'll see what can be done, but I can't promise that "soon" (I need to finish the work in the current "context", and only then switch to this "yaml-related").
First of all, the new behavior will be placed under the option;
I need to investigate yaml merge-expand / ruyamel behavior, sources & corner cases;
We need to decide whether megre-expand will be before "interpolation" or "after", or both - put it under 2 flags like: --merge-expand-pre, --merge-expand-post.
It is important to determine the paths during interpolation
... etc ...
I hope you don't need it urgently, I'll write it here when I start working on it.
Hi @inobelar, thanks for the response. I'm glad you embraced the feature request!
Like I stated in the orignal post, I'm using ruaml to achieve this merge-expand so there is no urgency. But I would be glad to remove this python script from my system.
Hi, thanks for developing the tool.
Is it possible to add a flag to fully expand merges and anchors? This tool is great for "rendering" complex .yaml setups and this feature would replace another yaml tool that I'm using to do this expansion.
this behavior is featured in the ruamel.yaml library (python)
$ yaml merge-expand input.yaml output.yaml
Example input:
Example output:
The text was updated successfully, but these errors were encountered: