Refactor Configuration System & Extend Documentation
This MR introduces an extensive refactoring of the pystencils-sfg configuration system, adds documentation and user guide sections about configuration, and extends the test suite.
Configuration System
- Replace
pystencilssfg.configurationbypystencilssfg.config; replaceSfgConfigurationbySfgConfig - Clean up structure and sections of
SfgConfig - Use an
Optiondescriptor to separately model default values and keep track of unset options- The value
Nonewill now always represent an unset option, i.e. one that the user has not specified. The default value for that option is still encapsulated by theOptiondescriptor, and will be returned as a fallback when callingget_option.
- The value
- Refactor command-line parsing and conflict checking between command-line and inline options
- Refactor configuration modules:
- Replace
sfg_config()byconfigure_sfg(config: SfgConfig), which gets a config object and must mutate that object to set the project configuration - Introduce
project_info()function that must return the project info object, instead of setting it on the configuration - Deprecate
CONFIGURATOR_SCRIPTcmake variable in favor ofCONFIG_MODULE
- Replace
- Add various test cases for configuration (inline and command-line)
- Add test cases for the CLI interface
Documentation
- Style: Expand sidebar navigation into sections
- Document the new configuration system
- Extend the generator script user guide with information on configuration and cmdline invocation
- Extend the project integration guide with info on config modules