|
| 1 | +"""Contracts for the public distribution metadata.""" |
| 2 | + |
| 3 | +from __future__ import annotations |
| 4 | + |
| 5 | +import tomllib |
| 6 | +from pathlib import Path |
| 7 | + |
| 8 | + |
| 9 | +def test_distribution_metadata_matches_public_identity() -> None: |
| 10 | + root = Path(__file__).parents[1] |
| 11 | + project = tomllib.loads((root / "pyproject.toml").read_text(encoding="utf-8"))["project"] |
| 12 | + |
| 13 | + assert project["description"] == ( |
| 14 | + "Serializable, runtime-neutral contracts for market data, artifacts, strategy " |
| 15 | + "lifecycles, and execution across ML4T libraries." |
| 16 | + ) |
| 17 | + assert project[ "authors"] == [{ "name": "Stefan Jansen", "email": "[email protected]"}] |
| 18 | + assert project[ "maintainers"] == [{ "name": "Stefan Jansen", "email": "[email protected]"}] |
| 19 | + assert set(project["keywords"]) == { |
| 20 | + "finance", |
| 21 | + "quantitative-finance", |
| 22 | + "algorithmic-trading", |
| 23 | + "trading", |
| 24 | + "market-data", |
| 25 | + "schemas", |
| 26 | + "data-contracts", |
| 27 | + "serialization", |
| 28 | + "backtesting", |
| 29 | + "live-trading", |
| 30 | + } |
| 31 | + assert project["license"] == "MIT" |
| 32 | + assert project["license-files"] == ["LICENSE"] |
| 33 | + assert project["urls"] == { |
| 34 | + "Homepage": "https://www.ml4trading.io/", |
| 35 | + "Documentation": "https://www.ml4trading.io/docs/specs/", |
| 36 | + "Repository": "https://github.com/ml4t/specs", |
| 37 | + "Issues": "https://github.com/ml4t/specs/issues", |
| 38 | + "Changelog": "https://github.com/ml4t/specs/releases", |
| 39 | + } |
0 commit comments