Skip to content

Conversation

@JHopeCollins
Copy link
Member

This is a convenience function to extract default arguments when you have multiple subsolvers whose prefixes have a common base, e.g. using -fieldsplit_option value to set defaults for both -fieldsplit_0_option and -fieldsplit_1_option

@JHopeCollins JHopeCollins self-assigned this Nov 6, 2025
@JHopeCollins JHopeCollins added the enhancement New feature or request label Nov 6, 2025
@JHopeCollins
Copy link
Member Author

JHopeCollins commented Nov 20, 2025

I think that this is ready to go now.
To use, you create a DefaultOptionsSet with a base_prefix and a set of custom_prefix_endings that gets passed to the OptionsManager. The OptionsManager checks that its own options_prefix is one of those in the DefaultOptionsSet. Any default options have the lowest priority, i.e. they are overridden by either the parameters passed to the OptionsManager or anything on the command line.
Docstring is quite long but hopefully clear.

Also I did a bit of docstring wrangling so things are linked rather than just rendered as code.

Copy link
Collaborator

@connorjward connorjward left a comment

Choose a reason for hiding this comment

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

In general I'm very happy. I think this is well written and the right approach.

@JHopeCollins JHopeCollins enabled auto-merge (squash) November 20, 2025 14:35
@JHopeCollins JHopeCollins enabled auto-merge (squash) November 20, 2025 14:35
@JHopeCollins JHopeCollins merged commit 6043df6 into main Nov 20, 2025
2 checks passed
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.

3 participants