New config parser - #1481
Merged
Merged
Conversation
veluca93
approved these changes
Jul 27, 2025
veluca93
left a comment
Contributor
There was a problem hiding this comment.
(but please don't merge until end of IOI ;-))
prandla
force-pushed
the
config-refactor
branch
2 times, most recently
from
July 27, 2025 10:05
2b1d576 to
47b2c2b
Compare
prandla
force-pushed
the
config-refactor
branch
from
August 4, 2025 17:01
47b2c2b to
839202d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I wrote a custom parser that turns the output from tomllib into a strongly-typed dataclass-based config object. (This is basically the same as what pydantic does, but it's much smaller. We really don't need to bring in such a big dependency for this, as was pointed out by Martin.)
I also reorganized the config file format into sections, which are used in both CMS code and in the config file. This means the PR is quite huge though... The main things to review are the .sample.toml files, cms/conf.py, and cmscommon/conf_parser.py.
I also:
This is an even more substantial change than the json->toml one. I'd like to get this in before we release 1.6, to avoid people having to port their configs twice (or well, the ones who were using the git version need to do it twice anyways, but that's unavoidable).
Maybe we should also provide a script that auto-converts json to the new config format.