Skip to main content

Version License Python Checked with pyright

Policy-driven validation and standardisation tool for Money Ex Machina Python packages.

mxm-foundry defines what constitutes a valid MXM package and provides a single interface (mxm-foundry check) to enforce that contract.

Purpose

MXM packages are designed to be:

  • structurally consistent
  • fully typed
  • reproducibly configured
  • CI-ready by construction
  • easy to reason about across repositories

mxm-foundry enforces this through a set of checks and policies covering:

  • filesystem structure
  • pyproject.toml semantics
  • typing configuration (Pyright)
  • formatting configuration (Black, Ruff, Isort)
  • Makefile orchestration (lint, type, test, check)
  • testing conventions (pytest)
  • documentation structure (README.md, CHANGELOG.md)
  • license compliance

A package that passes all checks satisfies the MXM publish contract.

Installation

pip install mxm-foundry

Usage

Run the validation tool against a project:

mxm-foundry check <project-root>

Example:

mxm-foundry check .

Output is grouped by policy and reports:

  • individual check results
  • policy-level pass/fail status
  • summary counts
  • non-zero exit code on failure (CI-compatible)

Policy Model

mxm-foundry organises validation into policies:

  • License policy — LICENSE presence and canonical content
  • Typing policy — Pyright configuration, absence of [tool.pyright], typing markers
  • Formatting policy — canonical Black, Ruff, Isort configuration and Makefile integration
  • Pyproject policy — structural correctness of pyproject.toml
  • Testing policy — pytest usage and Makefile integration
  • Check-gate policy — enforcement of make check as integration point
  • Documentation policy — README structure and CHANGELOG presence/format
  • Misc policy — remaining structural checks

Each policy aggregates multiple checks and fails atomically if any check fails.

Canonical Configuration

MXM packages are standardised against canonical definitions shipped with mxm-foundry:

  • canonical/pyproject.toml
  • canonical/pyrightconfig.json
  • canonical/Makefile

Checks compare project configuration exactly against these canonical sources.

This ensures:

  • zero configuration drift across packages
  • predictable tooling behaviour
  • uniform developer experience

Makefile Contract

The Makefile is a first-class interface in MXM packages.

Required targets:

  • fmt — formatting (ruff --fix, black, isort)
  • lint — static checks (ruff, black --check, isort --check)
  • type — type checking (pyright)
  • test — pytest execution
  • check — aggregate of lint, type, test
  • ci — alias for check

make check is the canonical publish gate.

Design Principles

  • Single validation interface
    One command (mxm-foundry check) defines package validity.

  • Policy-driven architecture
    Checks are grouped into semantic domains rather than treated independently.

  • Canonical configuration
    Tooling configuration is not inferred or approximated; it is enforced.

  • Deterministic results
    Checks run in a fixed order with stable output.

  • Strict typing
    Fully Pyright-clean and PEP 561 compliant.

  • Minimal implicit behaviour
    All structure and configuration is explicit and inspectable.

Development

poetry install

make check

poetry run mxm-foundry --help

License

MIT License. See LICENSE.

Metadata

Release files for mxm-foundry 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mxm-foundry 0.1.1
File Size Uploaded
mxm_foundry-0.1.1.tar.gz 16.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mxm-foundry 0.1.1
File Interpreter ABI Platform
mxm_foundry-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 43.3 kB

Release files / mxm_foundry-0.1.1.tar.gz

Download URL mxm_foundry-0.1.1.tar.gz
Size 16.5 kB
Tags Source
SHA-256 checksum
How to use checksums
0d6f786bddadb7efe3876dbc75e15b95f57448dbc0a4d0193bbba7c214510dad
BLAKE2b-256 checksum
How to use checksums
ba1e3f5d0aecd51bc5009ae0b91808e4619ae7d72340502f254f9ac47570c267
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 6, 2026.

Transparency log

Release files / mxm_foundry-0.1.1-py3-none-any.whl

Download URL mxm_foundry-0.1.1-py3-none-any.whl
Size 26.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2c714d0daa16fe310558fd9fbb49022bd4c596d3782edbcdc3a8ff511b802ebe
BLAKE2b-256 checksum
How to use checksums
9ca393000b4ed6d00ee74449ca8d2134e6a7eb502a1b69a512badbc518e540ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 6, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page