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

preserve ordering of bootstrap parameters in mkchain #468

Merged
merged 4 commits into from
Jul 6, 2022
Merged

Conversation

nicolasochem
Copy link
Collaborator

@nicolasochem nicolasochem commented Jul 6, 2022

Bootstrap parameters for mkchain are saved in a file, but PyYAML reorders them so they appear alphabetically in the values.yaml file outputted by mkchain. I like to have my chain bootstrap parameters sorted always the same way.

We pass a parameter to the pyyaml dumper to tell it to preserve ordering.

Bootstrap parameters for mkchain are saved in a file, but when we
assemle a values file, we store it alphabetically. I like to have my
parameters sorted always the same way.

We replace PyYAML with oyaml, which preserves ordering.
@harryttd
Copy link
Collaborator

harryttd commented Jul 6, 2022

This is a good idea :) Something i've wanted

We could keep the official lib and just add in the sort_keys=False arg to the dump function: https://stackoverflow.com/a/55171433/6379084

@nicolasochem
Copy link
Collaborator Author

We could keep the official lib and just add in the sort_keys=False arg to the dump function: https://stackoverflow.com/a/55171433/6379084

Ooh thanks. How did I miss this?

@nicolasochem
Copy link
Collaborator Author

@harryttd your suggestion has been applied, please review

@nicolasochem nicolasochem merged commit cdecf32 into master Jul 6, 2022
@nicolasochem nicolasochem deleted the oyaml branch July 6, 2022 18:03
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