Wondering how to keep your application config from getting outdated? Looking for a way to future-proof it in a backwards-compatible manner, keeping previous versions reproducible? Join this talk, we’ll share how declarative configs can be leveraged to make your code maintainable and reproducible at the same time.
Therefore, an overview across the application config landscape is given – from inputs as cli-args, env-vars, and config-files, to their representations in code, covering serialization & deserialization, type-safety with config-schemas and evolutions. We’ll recommend cherries to pick for a maintainable and expressive declarative config system.
All code examples are available at https://github.com/jstriebel/declarative-configs
03:02 Goals: Maintainability & Reproducability
Declarative Configurations and their Pythonic Representations 04:16 Toy Experiment 05:07 Declarative Configuration Exctraction 06:08 Input Formats, Representations & Deserialization https://typer.tiangolo.com https://www.attrs.org https://cattrs.readthedocs.io 08:49 Landscape Overview Blog Post comparing attrs, dataclasses & pydantic: https://stefan.sofa-rockers.org/2020/05/29/attrs-dataclasses-pydantic
Code Examples 10:10 Toy Example 11:08 Split Configuration 13:46 Type Checking https://mypy.readthedocs.io/ https://nbqa.readthedocs.io 15:15 Complex Example with Nested Configurations 18:45 Evolution of Old Configurations
Recap & Summary 20:15 Schema Versions & Evolutions 21:04 Experiment Tracking 21:34 Summary