Skip to content

Paddock v0.2.0

Choose a tag to compare

@todofixthis todofixthis released this 09 May 23:39
· 110 commits to main since this release
0.2.0
b317a1b

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 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-----