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

Handle merging (sub)segment lists in yaml merging #308

Open
ethteck opened this issue Nov 24, 2023 · 0 comments
Open

Handle merging (sub)segment lists in yaml merging #308

ethteck opened this issue Nov 24, 2023 · 0 comments

Comments

@ethteck
Copy link
Owner

ethteck commented Nov 24, 2023

We support merging of multiple input yamls, but since segment and subsegments are lists, they won't properly be merged by the existing implementation of yaml merging.

Proposal: I think we need custom logic here in merge_configs:

# keys exist and match, see if a list to append
if type(main_config[curkey]) == list:
    main_config[curkey] += additional_config[curkey]

inside that if, something like

if curkey in ["segments", "subsegments"]:
    merge_segment_list(main_config[curkey], additional_config[curkey])

and then implement merge_segment_list so that it looks to see if segments in the additional config share a name with any in the main config. and if so, merge those with the same name, using merge_configs()

@ethteck ethteck changed the title Handle merging (sub)segments in yaml merging Handle merging (sub)segment lists in yaml merging Nov 24, 2023
@ethteck ethteck linked a pull request Feb 3, 2024 that will close this issue
@ethteck ethteck removed a link to a pull request Feb 3, 2024
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

No branches or pull requests

1 participant