Repository navigation
Paddock v0.2.0
Paddock v0.2.0
Path-aware config validation with tilde expansion, host-path resolution, and a reworked volumes format.
Caution
Alpha software — here be dragons
This is an early release. APIs, configuration formats, and CLI flags may change without notice in future versions.
Warning
Breaking changes
volumesconfig format changed from a list of container path specs to a mapping of host paths to container path specs- Replace
volumes: ["/container/path:ro"]withvolumes: {"/host/path": "/container/path:ro"} - You'll know you need to migrate if you see:
TypeError: 'list' object is not a mappingor unexpected filter errors on thevolumesfield
- Replace
build.dockerfileandbuild.contextin the resolved config are nowPathobjects instead ofstr- Downstream code that treats these as strings will need to call
str()explicitly - You'll know you need to migrate if you see:
TypeError: expected str, not PosixPath
- Downstream code that treats these as strings will need to call
New features
Filepathfilter — accepts astrorPath, expands a leading~, and returns a resolvedPathresolveandmust_existdefault to active for host paths (nohome_dirsupplied) and inactive for container pathsis_dirparameter validates whether the path is a file or directory when it exists on disk
VolumeMapfilter — validates a{host_path: container_spec}dict, resolving and existence-checking host paths viaFilepathand validating container specs viaVolume
Enhancements
Volumefilter now accepts ahome_dirparameter for tilde expansion in container path specs- All path-typed config fields (
build.dockerfile,build.context) and theirPADDOCK_*env var counterparts are now tilde-expanded and resolved viaFilepath PADDOCK_*env vars are now validated as a flat schema before being mapped into the config structure; invalid values print a message to stderr and exit with status 1PADDOCK_CONFIG_FILEand--config-filepaths are now tilde-expanded before use- mypy static type checking added to pre-commit hooks
Note
Verifying release artefacts
- Import the signing key:
curl https://github.com/todofixthis.gpg | gpg --import - Download the
.whlor.tar.gzand its matching.sigfile from the release assets - Verify:
gpg --verify phx_paddock-0.2.0-py3-none-any.whl.sig phx_paddock-0.2.0-py3-none-any.whl
Key fingerprint: 457997A2A506270F918D7BD1925CC6E316680401
SHA256 Checksums
eef6e5728c82055d5cb3530135dee235caca32b90c026449ec6ac50e78345ef7 dist/phx_paddock-0.2.0-py3-none-any.whl
adc68e6f2b0d0af5e532d0b175f6c55696998546ec652c3052c016f6a9b7d071 dist/phx_paddock-0.2.0.tar.gz
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
# Paddock v0.2.0
Path-aware config validation with tilde expansion, host-path resolution, and a reworked volumes format.
> [!CAUTION]
> **Alpha software — here be dragons**
> This is an early release. APIs, configuration formats, and CLI flags may change without notice in future versions.
> [!WARNING]
> **Breaking changes**
> - `volumes` config format changed from a list of container path specs to a mapping of host paths to container path specs
> - Replace `volumes: ["/container/path:ro"]` with `volumes: {"/host/path": "/container/path:ro"}`
> - You'll know you need to migrate if you see: `TypeError: 'list' object is not a mapping` or unexpected filter errors on the `volumes` field
> - `build.dockerfile` and `build.context` in the resolved config are now `Path` objects instead of `str`
> - Downstream code that treats these as strings will need to call `str()` explicitly
> - You'll know you need to migrate if you see: `TypeError: expected str, not PosixPath`
## New features
- - `Filepath` filter — accepts a `str` or `Path`, expands a leading `~`, and returns a resolved `Path`
- `resolve` and `must_exist` default to active for host paths (no `home_dir` supplied) and inactive for container paths
- `is_dir` parameter validates whether the path is a file or directory when it exists on disk
- - `VolumeMap` filter — validates a `{host_path: container_spec}` dict, resolving and existence-checking host paths via `Filepath` and validating container specs via `Volume`
## Enhancements
- - `Volume` filter now accepts a `home_dir` parameter for tilde expansion in container path specs
- - All path-typed config fields (`build.dockerfile`, `build.context`) and their `PADDOCK_*` env var counterparts are now tilde-expanded and resolved via `Filepath`
- - `PADDOCK_*` env vars are now validated as a flat schema before being mapped into the config structure; invalid values print a message to stderr and exit with status 1
- - `PADDOCK_CONFIG_FILE` and `--config-file` paths are now tilde-expanded before use
- - mypy static type checking added to pre-commit hooks
> [!NOTE]
> **Verifying release artefacts**
> 1. Import the signing key: `curl https://github.com/todofixthis.gpg | gpg --import`
> 2. Download the `.whl` or `.tar.gz` and its matching `.sig` file from the release assets
> 3. Verify: `gpg --verify phx_paddock-0.2.0-py3-none-any.whl.sig phx_paddock-0.2.0-py3-none-any.whl`
>
> Key fingerprint: `457997A2A506270F918D7BD1925CC6E316680401`
# SHA256 Checksums
eef6e5728c82055d5cb3530135dee235caca32b90c026449ec6ac50e78345ef7 dist/phx_paddock-0.2.0-py3-none-any.whl
adc68e6f2b0d0af5e532d0b175f6c55696998546ec652c3052c016f6a9b7d071 dist/phx_paddock-0.2.0.tar.gz
-----BEGIN PGP SIGNATURE-----
iJsEARYKAEMWIQRFeZeipQYnD5GNe9GSXMbjFmgEAQUCaf/FhSUcdG9kb2ZpeHRo
aXNAdXNlcnMubm9yZXBseS5naXRodWIuY29tAAoJEJJcxuMWaAQBSGcBAKyrmgJv
eCc6q7L5Sc7gKGp8PIaYJsv1XSPEb8y9r7YDAQCq1d32r7w9cBnaxgvVMdP2A9Xu
G58vuWuGjorfIRVlCw==
=38Lj
-----END PGP SIGNATURE-----