惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

腾讯CDC
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - Franky
博客园_首页
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
IT之家
IT之家
The Cloudflare Blog
V
Visual Studio Blog
罗磊的独立博客
T
Tailwind CSS Blog
S
SegmentFault 最新的问题
Hugging Face - Blog
Hugging Face - Blog
V
V2EX
阮一峰的网络日志
阮一峰的网络日志
D
Docker
Last Week in AI
Last Week in AI
B
Blog RSS Feed
C
Check Point Blog
J
Java Code Geeks
The GitHub Blog
The GitHub Blog
有赞技术团队
有赞技术团队
博客园 - 聂微东
MongoDB | Blog
MongoDB | Blog
雷峰网
雷峰网

Hacker News: Show HN

PurrrrrFocus: Pomodoro Timer App - App Store Workflow Engine — Multi-Step Orchestration for Bun RapidPhoto: Pro Photo Editor App - App Store GitHub - DheerG/swarms: Achieve extraordinary results with claude code across a variety of tasks SPICE simulation → oscilloscope → verification with Claude Code — Lucas Gerads Show HN: VCoding – A 5 MB native Windows IDE with no dynamic dependencies Show HN: LLMs don't hallucinate because they're bad at math, it's the format GitHub - Agent-FM/agentfm-core: AgentFM is a peer-to-peer network that turns everyday computers into a decentralized AI supercomputer. AgentFM lets you run massive AI workloads directly across a global mesh of idle CPUs and GPUs. Show HN: Tracking Top US Science Olympiad Alumni over Last 25 Years GitHub - Potarix/agent-hub: One place to talk to all your agents Show HN: Runtime security for AI agents(injection,tool abuse, data exfiltration) GitHub - dubeyKartikay/lazyspotify: Terminal Spotify client for macOS and Linux GitHub - the-banana-tool/king-louie: Easy to use GUI Personal AI Assistant. Win/Linux/Mac. Show HN I made my vacation rental bookable by AI agents–no Airbnb, 0% commission GitHub - basteez/jsf-autoreload: maven plugin to enable hot reload on jsf projects uvm32/hosts/host-gdbstub at main · ringtailsoftware/uvm32 GitHub - labsai/EDDI: Config-driven engine that turns JSON into production-grade AI agents. Multi-agent orchestration, 12+ LLM providers, MCP/A2A protocols, RAG, persistent memory, and enterprise compliance (EU AI Act, GDPR, HIPAA). Built on Quarkus. GitHub - glitchnsec/fortyone-oss: AI Executive Assistant Platform Quickstart | Alien GitHub - muxshed/shed: One stream in, or many. Every destination, simultaneously. No cloud middleman, no per-channel fees, no limits. GitHub - ocrbase-hq/ocrbase: 📄 PDF/IMG ->.MD/JSON Document OCR API for PaddleOCR and GLMOCR. Self-hostable. GitHub - impactjo/home-memory: MCP server that lets your AI assistant remember everything about your home. GitHub - Sets88/dbcls: DbCls is a powerful terminal database client that supports various databases GitHub - neptun2000/heor-agent-mcp GitHub - SeanFDZ/macmind: Single-layer transformer in HyperTalk for the classic Macintosh RollQuation: Math Puzzles - Apps on Google Play GitHub - dropbox/witchcraft Show HN: Agent-cache – Multi-tier LLM/tool/session caching for Valkey and Redis GitHub - opentalon/opentalon: OpenTalon is an open-source platform built from the ground up in Go as a robust alternative to OpenClaw LinkedIn™ 职位抓取工具 - Chrome 应用商店
GitHub - atsuoishimoto/uv-matrix: Tiny matrix runner for ...
atsuoishimot · 2026-06-27 · via Hacker News: Show HN

A tiny matrix runner for Python projects using Astral uv.

Status: early development.

uv-matrix expands declarative matrices from pyproject.toml into jobs, runs them with uv run, and reports failures.

📖 Documentation: https://uv-matrix.readthedocs.io/

uv-matrix does not manage Python interpreters, virtual environments, or dependencies itself. All interpreter discovery and download, virtual environment creation, and dependency resolution come from uv. uv-matrix only decides which commands to run, with which matrix values, and in what order.

Why uv-matrix?

Many Python projects need to run the same checks across several Python versions, dependency versions, or task variants.

uv-matrix is pyproject.toml-centered: matrices and reusable tasks live alongside the rest of your project configuration:

[tool.uv-matrix.matrix.test]
python-version = ["3.12", "3.13"]
tasks = ["run-test"]

[tool.uv-matrix.tasks.run-test]
run = "pytest"

It is intentionally smaller than tox. tox manages test environments; uv-matrix delegates environment management to uv and focuses only on scheduling matrix jobs.

How is this different from tox?

tox is powerful and mature, but matrix-style configuration can become hard to read when combinations are encoded into environment names and factors.

uv-matrix keeps the matrix explicit: Python versions, dependency variants, and task variants are written as plain axes in pyproject.toml.

Installation

uv-matrix needs Python 3.10+ and a working uv install.

uv add --dev uv-matrix
uv run uv-matrix --help

Or run it directly:

Configuration

Configuration lives under [tool.uv-matrix] in pyproject.toml.

[project]
name = "matrix-test"
version = "0.1.0"
requires-python = ">=3.12"

# Optional dependencies (extras) selectable per job via a task's `extras`.
[project.optional-dependencies]
django = [
    "django>=6.0.6",
]
flask = [
    "flask>=3.1.3",
]

# Dependency groups selectable per job via a task's `groups`.
[dependency-groups]
dev = [
    "ruff>=0.15.20",
]
doc = [
    "sphinx>=9.1.0",
]

[tool.uv-matrix]
continue-on-error = false  # stop the run on the first failing job (the default)
max-jobs = 4               # run up to 4 jobs at once (1 = sequential)

# A matrix named "test": every key except `tasks` is an axis, and the axes are
# combined as a cartesian product (here 2 x 3 = 6 cells).
[tool.uv-matrix.matrix.test]
python-version = ["3.12", "3.13"]   # reserved axis: inherited as `uv run --python`
webui = ["", "django", "flask"]     # arbitrary axis: read in templates as matrix['webui']
tasks = ["test"]                    # run these tasks for every cell


# A second, independent matrix. With no extra axes it runs each task once.
[tool.uv-matrix.matrix.checks]
python-version = ["3.13"]
tasks = ["lint", "doc"]

# Task definitions are reusable across matrices. `run` is the command to execute.
[tool.uv-matrix.tasks.test]
run = "pytest {{ posargs }}"   # {{ posargs }} expands to args passed after `--`
extras = ["{{ matrix['webui'] }}"]   # adds `--extra <webui>`; the empty "" cell renders blank and is dropped
when = "matrix['webui'] != 'django' or platform != 'win32'"   # run unless it's the django cell on Windows; a false `when` skips the job

[tool.uv-matrix.tasks.lint]
run = "ruff check ."

[tool.uv-matrix.tasks.doc]
groups = ["doc"]      # adds `--group doc` to the uv run command
run = "make html"
cwd = "docs"          # run the command from this directory

A matrix defines the values to test. A task defines the command to run.

Task fields support Jinja2 templates such as {{ matrix['webui'] }} and {{ posargs }}; see the template reference for available variables and rendering rules.

when is evaluated with Python's eval against uv-matrix-provided context, so treat configuration as trusted project code; see the conditions reference for available variables and examples.

These templates and when expressions are evaluated only when you invoke run (the point at which jobs are actually built and executed). Commands that merely enumerate jobs, such as list, expand the matrix without rendering templates or evaluating when, so nothing from your config is executed.

The example above expands to:

test:test    python-version=3.12 webui=""
test:test    python-version=3.12 webui="django"
test:test    python-version=3.12 webui="flask"
test:test    python-version=3.13 webui=""
test:test    python-version=3.13 webui="django"
test:test    python-version=3.13 webui="flask"
checks:lint  python-version=3.13
checks:doc   python-version=3.13

Inside a matrix, every key except tasks defines an axis. The special python-version axis is inherited by tasks that do not set their own Python version.

Commands are executed through uv run. Each job runs in its own isolated environment rather than the project's .venv. For example, the test task above runs roughly like this on Linux:

uv run --python 3.12 sh -c "pytest"

Usage

uv-matrix run                          # run every job from every matrix
uv-matrix run --matrix test            # run one matrix
uv-matrix run --filter webui=django    # select jobs
uv-matrix run --task lint              # run one task wherever it appears
uv-matrix run --max-jobs 4             # run up to 4 jobs at once
uv-matrix run --dry-run                # print commands without running them
uv-matrix run --task test -- -k slow   # pass extra args as {{ posargs }}
uv-matrix list                         # list selectable jobs

By default, uv-matrix finds pyproject.toml by walking up from the current directory, then runs from the project root. Override this with --config PATH or --project DIR.

License

MIT License. See LICENSE for details.