
YAML
Splitting a Large YAML Config Into Several Files Cleanly
YAML has no include. Two ways to split a config: numbered fragments merged in order, and a custom include tag on a safe loader. Both tested, with traps.
7 min read
Tag
40 posts

YAML has no include. Two ways to split a config: numbered fragments merged in order, and a custom include tag on a safe loader. Both tested, with traps.

PyYAML keeps the last of a repeated key silently, ruamel.yaml raises and yamllint flags it. A strict loader in eight lines and how merges create duplicates.

Build a job that queries a database, writes an Excel file and emails it on a schedule with smtplib and cron, with safe credentials and failure alerts.

Python 3.10 in a CI matrix loads as 3.1 in every parser. See the proof, why quoting is the fix and a script that finds suspect floats in a repository.