Skip to content

Allow reading from config.json for matrix command line flags#702

Merged
ty-porter merged 15 commits into
devfrom
700-config-matrix-options
Apr 4, 2026
Merged

Allow reading from config.json for matrix command line flags#702
ty-porter merged 15 commits into
devfrom
700-config-matrix-options

Conversation

@ty-porter

@ty-porter ty-porter commented Apr 2, 2026

Copy link
Copy Markdown
Contributor

Closes #700

Adds ability to read from a config file matrix subsection for the CLI flags. This is more complex than it sounds due to 1) a circular dependency on CLI read vs. config instantiation and 2) tests also reading command line flags implicitly

We read flags in 2 passes. The first pass picks up --config if it exists. This lets a new config object read the values in matrix and pass it back to the parser which uses those values as default.

The priority of flags is user-specified CLI flags > JSON config flags > argparse defaults

updated and the config validator is expanded to completely ignore the matrix subkeys when removing keys. It still adds the section overall if it is missing.

@ty-porter ty-porter linked an issue Apr 2, 2026 that may be closed by this pull request
"format"
],
"patternProperties": {
"^\\$schema$": { "type": "string" }

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

All the tooling around this is brittle because the keywords are colliding... This is the best solution I could come up with.

Comment thread data/config/__init__.py Outdated
Comment thread data/config/__init__.py Outdated
Comment thread data/config/__init__.py Outdated
@ty-porter ty-porter force-pushed the 700-config-matrix-options branch from b435084 to a0ece15 Compare April 2, 2026 19:42

@WardBrian WardBrian left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

edit: didn't mean to post a top level comment here

Comment thread driver/__init__.py Outdated
Comment thread data/config/__init__.py
Comment thread cli.py Outdated
@ty-porter ty-porter force-pushed the 700-config-matrix-options branch from e788aa8 to 1b9f864 Compare April 3, 2026 01:26
@ty-porter ty-porter marked this pull request as ready for review April 3, 2026 02:03
@ty-porter ty-porter added this to the 9.0 milestone Apr 3, 2026

@WardBrian WardBrian left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm not able to try it out locally atm, but reading over the changes I think this is good to go!

@ty-porter ty-porter merged commit acae17c into dev Apr 4, 2026
6 checks passed
@WardBrian WardBrian deleted the 700-config-matrix-options branch April 9, 2026 00:42
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.

Allow storing matrix config options in config.json

2 participants