Skip to content

Feature/settings#212

Draft
corentincarton wants to merge 2 commits intodevelopmentfrom
feature/settings
Draft

Feature/settings#212
corentincarton wants to merge 2 commits intodevelopmentfrom
feature/settings

Conversation

@corentincarton
Copy link
Collaborator

@corentincarton corentincarton commented Feb 25, 2026

DRAFT PR! Don't review yet, we'll iterate on the code.

Adding lisflood-settings tool, with following use cases:

# Validate only (no output file is written)
lisflood-settings check -i in.xml

# Clean/lint a settings file (no updates, writes formatted copy)
lisflood-settings set -i in.xml -o out.xml

# Update from file plus explicit overrides
lisflood-settings set -i in.xml -o out.xml -f updates.yaml --lfoptions wateruse=1 TemperatureInKelvin=0 --lfuser PathRoot=/data/project NetCDFTimeChunks=10

…lled updates

- add new CLI module at src/lisflood/settings_tool.py
- support updates from YAML and CLI args for lfoptions/lfuser only
- preserve comments and write pretty-printed XML output
- add --check mode for structure/section validation without writing
- intentionally disable lfbinding/lfuser compatibility enforcement
- expose tool via setup.py console entry point:
  lisflood-settings-tool=lisflood.settings_tool:main
- document usage examples in README
- add focused tests for rewrite, YAML/CLI updates, check mode, and
  protection against lfbinding edits
@corentincarton corentincarton changed the base branch from master to development February 25, 2026 14:47
…nd explicit I/O flags

- rename console script from lisflood-settings-tool to lisflood-settings
- replace flat interface with subcommands: check and set
- switch positional input/output to explicit flags: --input/-i and --output/-o
- rename --yaml to --file/-f and --option/--user to --lfoptions/--lfuser
- remove deprecated generic --set section.name=value interface
- allow list-style and repeated key/value updates for --lfoptions and --lfuser
- enforce KEY=VALUE parsing at argparse level for clearer failures
- keep edits constrained to lfoptions and lfuser (lfbinding untouched)
- update README examples and expand tests for new interface and validation
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.

1 participant