Validation Guide for CLI YAML Configuration
Run these checks from the repository root. Use the repository's uv and Taskfile workflow with Python 3.14 for development and Python 3.11 for the compatibility run.
Run the automated scenarios
task backend:install
task backend:test -- tests/cli tests/core/test_search.py
task backend:packaging:test -- tests/packaging/test_cli_search.py
task backend:imports
task docs:checkThe CLI and installed-wheel suites use synthetic provider and notification responses. Run the wheel tests with a base install and verify the file command works outside the checkout.
| Scenario | Expected result |
|---|---|
| Run three watches against two providers, including overlapping same-provider searches | Each watch applies its own filters. A stalled provider does not delay the other provider. Same-provider aliases share pacing. |
| Interrupt with active and sleeping searches | Every search stops and all owned provider clients close. |
| Inherit ntfy, override with Pushover, and disable with an empty list | Alerts carry the search name and reach only the selected channels. A cleared RV length bypasses the provider capability check for that filter. |
| Observe an opening, an unchanged opening, a failed check, closure, and reopening | Exactly two alerts for the affected search and channel. Repeat single-pass runs with separate state files. |
| Run one successful match, one successful empty search, and one failure | One JSON array in file order, containing all three outcomes. The exit status is 1 and stdout contains only JSON. |
| Supply an invalid final search, duplicate key, conflicting flag, or state path collision | Exit with a useful diagnostic before any provider or notification request or state-file write. |
| Run the current flag-only commands | Existing stays, JSON output shape, validation, and help work as before. |
Validate the same structural examples against docs/cli-yaml-config.schema.json and the Pydantic input models. Run separate checks for local scalar parsing, inherited constraints, and runtime-only rules.
To regenerate the editor schema from Pydantic, run uv run --locked python -m camply.cli.yaml_config from the repository root. The pre-commit hook runs the same command when the schema or its inputs change.
Try file mode from a shell
Use
uv run camply providersanduv run camply campgrounds --provider PROVIDER --search QUERYwith two providers to find real campground IDs.Copy the example from the specification to
camply.yaml. Use the discovered IDs and future date windows. Omit notification settings for a console-only check, or supply the existing channel environment settings to verify delivery.Check the file once and validate its output.
bashuv run camply campsites --yaml-config camply.yaml --search-once --json > outcomes.json uv run python -m json.tool outcomes.jsonRun
uv run camply campsites --yaml-config camply.yamlto watch continuously, then press Ctrl-C. Compare output with the CLI contract.
For editor validation, associate camply.yaml with the checked-in schema using the editor's schema settings. Keep live-provider checks separate from automated acceptance so results do not depend on upstream inventory.