Skip to content

Add populating a config dataclass from multiple INI/TOML sections - #102

Merged
mksanger merged 1 commit into
wtsi-npg:develfrom
kjsanger:feature/multi-section-config
Oct 30, 2026
Merged

mksanger merged 1 commit into
wtsi-npg:develfrom
kjsanger:feature/multi-section-config

Conversation

@kjsanger

Copy link
Copy Markdown
Member

This solves an issue I encountered elsewhere where I want to load a config dataclass, but the config values are distributed across two sections. Currently only one section name can be provided, so all the config values must be in one section.

This change allows more than one section to be named while loading, but keeps backward compatibility if only one section is used.

@kjsanger kjsanger added the enhancement New feature or request label Oct 27, 2026

@mksanger mksanger left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

I'd prefer that the section names weren't split between two variable names whose only purpose is to be rejoined, but I understand the impulse to avoid a breaking change, and I don't have a better idea

@mksanger
mksanger merged commit f62286f into wtsi-npg:devel Oct 30, 2026
4 checks passed
@kjsanger

Copy link
Copy Markdown
Member Author

I'd prefer that the section names weren't split between two variable names whose only purpose is to be rejoined, but I understand the impulse to avoid a breaking change, and I don't have a better idea

Same, but I didn't want to deal with causing a major version bump right now. It could be resolved next time we do have a major release, if we still think it's worth it.

@kjsanger
kjsanger deleted the feature/multi-section-config branch October 30, 2026 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants