Skip to main content

CLI output assertion tool for documentation testing

Project description

mustmatch

mustmatch provides two tightly coupled capabilities for executable documentation workflows. It asserts CLI output in shell pipelines, and it executes Markdown bash/python fences as pytest tests. The Rust core handles parsing, normalization, and comparison while Python keeps runtime orchestration.

Install

Use a normal Python virtual environment and install with pip. This snippet is documentation-only and intentionally skipped during executable doc runs.

pip install mustmatch

CLI Assertions

Pipe command output into mustmatch and compare against one expected value.

echo "hello" | mustmatch "hello"
echo "hello world" | mustmatch like "world"
echo "v1.2.3" | mustmatch "/^v[0-9]+[.][0-9]+[.][0-9]+$/"
echo '{"status":"ok","count":42}' | mustmatch like '{"status":"ok"}'

Executable Markdown

Markdown documents become test files under pytest collection. Tables can drive per-row Python checks with each_row.

# Math Behavior

## Double Values

| input | output |
|-------|--------|
| 2     | 4      |

```python each_row
doubled = row.input * 2
result = {"input": row.input, "output": doubled}
row_label = f"row-{row_index}"
```

Run docs as tests:

uv sync --extra dev --reinstall-package mustmatch
uv run python -m pytest docs/ -v

Quality Checks

Use mustmatch verify-matrix to confirm proof-matrix references stay inside the repo, and mustmatch lint to lint markdown specs without executing their fences.

  • mustmatch verify-matrix .march/design-final.md --repo-root .
  • mustmatch lint docs/02-cli-assertions.md

Documentation Map

The executable specification is in docs/:

  1. docs/01-overview.md
  2. docs/02-cli-assertions.md
  3. docs/03-executable-documents.md
  4. docs/04-fixtures-and-tables.md
  5. docs/05-directives.md
  6. docs/06-comparison-modes.md
  7. docs/07-normalization.md
  8. docs/08-configuration.md
  9. docs/09-examples.md
  10. docs/10-verify-matrix.md
  11. docs/11-lint.md

CLI Bench Plan

Benchmark commands are tracked in bench/clibench-commands.txt so Python and Rust paths can be compared with the same tag set.

# Python baseline
CLIBENCH_PROJECT=mustmatch-cli uv run --script /home/ian/workspace/.codex/skills/clibench/clibench.py batch bench/clibench-commands.txt

# Compare prefixes
CLIBENCH_PROJECT=mustmatch-cli uv run --script /home/ian/workspace/.codex/skills/clibench/clibench.py compare python rust

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mustmatch-0.0.4.tar.gz (28.9 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

mustmatch-0.0.4-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.2 MB view details)

Uploaded PyPymanylinux: glibc 2.17+ ARM64

mustmatch-0.0.4-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.2 MB view details)

Uploaded PyPymanylinux: glibc 2.17+ ARM64

mustmatch-0.0.4-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.2 MB view details)

Uploaded PyPymanylinux: glibc 2.17+ ARM64

mustmatch-0.0.4-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.2 MB view details)

Uploaded PyPymanylinux: glibc 2.17+ ARM64

mustmatch-0.0.4-cp310-abi3-win_amd64.whl (960.7 kB view details)

Uploaded CPython 3.10+Windows x86-64

mustmatch-0.0.4-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.2 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ARM64

mustmatch-0.0.4-cp310-abi3-macosx_11_0_arm64.whl (1.1 MB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

mustmatch-0.0.4-cp310-abi3-macosx_10_12_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.10+macOS 10.12+ x86-64

mustmatch-0.0.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

File details

Details for the file mustmatch-0.0.4.tar.gz.

File metadata

  • Download URL: mustmatch-0.0.4.tar.gz
  • Upload date:
  • Size: 28.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mustmatch-0.0.4.tar.gz
Algorithm Hash digest
SHA256 0ac7ced91853d7f62a335a53d8aa67a1f030ea768f87dd048b8aa0de3d97ae42
MD5 bbcd09ed42dcf1e8a233cdf575c4eb62
BLAKE2b-256 fa1352e91142b85603bc63e0e827fb7069134376bf0b5eb9338782be8dc64c9c

See more details on using hashes here.

Provenance

The following attestation bundles were made for mustmatch-0.0.4.tar.gz:

Publisher: release.yml on genomoncology/mustmatch

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mustmatch-0.0.4-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for mustmatch-0.0.4-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 35d01e2e6baa012eeed3d5ef2f467c60a0d34d906ed68756972e7443605eca76
MD5 172d56a07014148b1ca04ec91e802561
BLAKE2b-256 e1fd03270f7aecd96a691184d6f845520dc75286506f37be63563bc3b499f380

See more details on using hashes here.

Provenance

The following attestation bundles were made for mustmatch-0.0.4-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release.yml on genomoncology/mustmatch

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mustmatch-0.0.4-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for mustmatch-0.0.4-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 1c215d0c2e060f5314436fe3b3fb62d31ce5b54b300a6130d071ed75db074e20
MD5 192c70407c6e6dc7c31aae3441c0e632
BLAKE2b-256 767f447b0f16a67138aaec5ed54c07562714d296fbaee4169361ebab74a8f892

See more details on using hashes here.

Provenance

The following attestation bundles were made for mustmatch-0.0.4-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release.yml on genomoncology/mustmatch

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mustmatch-0.0.4-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for mustmatch-0.0.4-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 141901c8c4e7834e5806edbabe5440b3b61475c0f712d88e3fa6c9d00e517d3e
MD5 255298be172522dbb6bdfd55b6481132
BLAKE2b-256 2edf9d8432a27e5aa40176ffd52366eeb83f0d7a015b36776b772d9d66e5ef3b

See more details on using hashes here.

Provenance

The following attestation bundles were made for mustmatch-0.0.4-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release.yml on genomoncology/mustmatch

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mustmatch-0.0.4-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for mustmatch-0.0.4-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 a09c484493b049006d3533e25e0d5a4f803db393569ecbe4abc1fa57c28ba244
MD5 e1d79076fbdff3137d750976248b7f40
BLAKE2b-256 59fca670f2757d9b71e9bf709c1fc467f29ae9797bd9d3c95546bf902aeb4a33

See more details on using hashes here.

Provenance

The following attestation bundles were made for mustmatch-0.0.4-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release.yml on genomoncology/mustmatch

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mustmatch-0.0.4-cp310-abi3-win_amd64.whl.

File metadata

  • Download URL: mustmatch-0.0.4-cp310-abi3-win_amd64.whl
  • Upload date:
  • Size: 960.7 kB
  • Tags: CPython 3.10+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mustmatch-0.0.4-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 249de695f448a4e42840d595ba8951832cbcf126d68f71a11021f3ca24c0ab23
MD5 83ced44f439aa2062c9e896ba44ed297
BLAKE2b-256 034eec1c2fea570cbe8436a95f142e12587e007033abc085e05ba8069a971882

See more details on using hashes here.

Provenance

The following attestation bundles were made for mustmatch-0.0.4-cp310-abi3-win_amd64.whl:

Publisher: release.yml on genomoncology/mustmatch

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mustmatch-0.0.4-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for mustmatch-0.0.4-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 5c03a2f23e16378d47f81e9cb7cbed94bda2450aa19d090f2ce17c5d5469b448
MD5 e72925beab91fb1259a150b3e9d1a9fd
BLAKE2b-256 6049714896f65f02ce30bc352765c52383e491939d2c81fce620cfa6e37fe129

See more details on using hashes here.

Provenance

The following attestation bundles were made for mustmatch-0.0.4-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release.yml on genomoncology/mustmatch

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mustmatch-0.0.4-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mustmatch-0.0.4-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ecc503d8591d9d4b230b3622f7b3fd6b226b285c6f2ea3bc8e3a62f95056555b
MD5 f10ed86945f8c7820013350fd39c00eb
BLAKE2b-256 f4d43e2d510af15f7c93a4016ca05a84b3361348ef742573f68b3c070e28ebb4

See more details on using hashes here.

Provenance

The following attestation bundles were made for mustmatch-0.0.4-cp310-abi3-macosx_11_0_arm64.whl:

Publisher: release.yml on genomoncology/mustmatch

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mustmatch-0.0.4-cp310-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for mustmatch-0.0.4-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 e79201859fea188fe91ea58c20a3f5f501eeb886db9ba7d757390827cf4bd2af
MD5 f6630d1d808b7a41830476d450032863
BLAKE2b-256 bce6c58e8dde547b4f22cb23b128236f4fc66bfa14b090e6c8817b1a83cd92ac

See more details on using hashes here.

Provenance

The following attestation bundles were made for mustmatch-0.0.4-cp310-abi3-macosx_10_12_x86_64.whl:

Publisher: release.yml on genomoncology/mustmatch

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mustmatch-0.0.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for mustmatch-0.0.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 dcc3b7844923c14dd67a71bed19eac325042bcdd2da25cc418535b3940a1b9cd
MD5 1890b4e58d5f349feb188d2501c0fe41
BLAKE2b-256 f7e2ada3d73f0310d01d369d95f259d6fee9b936e7b445efafcc49f69965c43b

See more details on using hashes here.

Provenance

The following attestation bundles were made for mustmatch-0.0.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on genomoncology/mustmatch

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page