simboard (Developer Reference)
Implementation
Python module:
zppy/simboard.pyJinja2 template: none (configuration-only hook, no HPC job is submitted)
The simboard section is a configuration-only task hook, analogous to
bundle (Developer Reference). It performs validation and, when enabled = True and
[default] www is empty, infers www from Mache’s
web_portal.base_path.
Key functions in zppy/simboard.py:
simboard(config, script_dir, existing_bundles, job_ids_file): the main hook registered in_launch_scripts. Validates that the[simboard]section contains no subsections and returnsexisting_bundlesunchanged.simboard_enabled(config): parses theenabledfield from a bool or"true"/"false"string (case-insensitive).validate_simboard_config(config): rejectssimulation_type = "none"whenenabled = True.normalize_web_portal_base_path(path): strips leading/trailing whitespace and trailing slashes.infer_simboard_www(machine_info, config): builds<web_portal_base_path>/diagnostics_archive/<simulation_type>/; raises a descriptiveValueErrorif Mache has no (or empty)web_portal.base_pathfor the machine.
www inference is wired into _determine_parameters in
zppy/__main__.py via the _set_default_www helper, which:
Always calls
validate_simboard_config(checkssimulation_typeeven whenwwwis already set).Returns immediately if
wwwis already set.Otherwise requires
simboard.enabled = True; callsinfer_simboard_wwwand setsconfig["default"]["www"].
Config defaults (zppy/defaults/default.ini)
[simboard]
enabled = boolean(default=False)
simulation_type = option("production", "development", "none", default="development")
Dependencies
Upstream (what simboard depends on):
None
Downstream (what depends on simboard):
None (the
[simboard]section has no downstream task dependencies; it only setswww, which is consumed by every visual-output task)
Testing
Unit tests are in tests/test_zppy_main.py and cover:
wwwinference for bothproductionanddevelopmenttypes.Path normalization (trailing slash, leading/trailing whitespace).
simboard_enabledparsing (bool, string, invalid).Explicit
wwwis preserved when SimBoard is enabled.Error on empty
wwwwith SimBoard disabled.Error on
simulation_type = "none"when enabled.Errors when Mache has no or empty
web_portal.base_path.Rejection of subsections under
[simboard].Rejection of invalid
simulation_typevalues via ConfigObj validation.
Integration tests are in tests/integration/test_simboard_settings.py
and cover all four rows of the expected-behavior table using a real
zppy config file with dry_run = True.