Input validation - #143
Open
AdhocMan wants to merge 4 commits into
Open
Conversation
Documentation build overview
15 files changed ·
|
AdhocMan
marked this pull request as ready for review
August 17, 2026 12:00
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.
Replace the packaged base config (
tabascal/data/config/tab_config_base.yaml) and itsdeep_updatemerge with a declarative schema. Every parameter is declared as aParamonthe class that reads it — components in their own
config_params, everything else onTabConfig— so a component and its requirements cannot drift apart, and there is no secondcopy of the key names to keep in sync.
What this changes
tabascal/config_schema.py:Param,collect_params,validate_config, and aConfigError. Validation runs before the Measurement Set is read or any TLEs are fetched,applies defaults, and collects every problem into one report (with
difflibsuggestionsfor misspelled keys) instead of failing on the first one.
model.componentscontribute, so a keybelonging to an unselected component is reported as such rather than silently ignored.
tabascal check-config -c <file>subcommand: validates a config and prints theresolved model and the fully defaulted configuration, without running anything.
FROM_DATA(correlation lengths, noise, dishdiameter) stay unresolved until
setup.axis_extentincomponents/__init__.pygives asingle-sample axis its sample spacing instead of a zero length scale.
SLURM_TIMELIMITis now applied per job via a YAML anchor. Set globally it wasoverridden by the job-level value the CSCS
.container-runner-*templates inherit, leavingevery job on the template's 15 minutes.
docs/config.mdrewritten around the declared parameters,docs/usage.mddocumentscheck-config, and the example/test configs drop keys that nolonger exist.
Tests
tests/test_config_schema.py(new) covers type/range checking, unknown and missing keys,component-scoped parameters, and multi-problem reporting;
test_run_cli.pycovers the newsubcommand. Gains and RFI signal tests updated for the resolved-config path.