Make renderers optional and add PyPI publish workflow#1279
Conversation
|
@cursoragent change PYPI_TOKEN -> PYPI_RENDERERS_TOKEN |
|
@cursoragent use pypi version as source for renderers, not local package |
|
Co-authored-by: will brown <willccbb@users.noreply.github.com>
Co-authored-by: will brown <willccbb@users.noreply.github.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 7ebf026. Configure here.
| { name = "numpy" }, | ||
| { name = "torch" }, | ||
| { name = "numpy", marker = "(python_full_version < '3.11' and sys_platform == 'emscripten') or (python_full_version < '3.11' and sys_platform == 'win32') or (sys_platform != 'emscripten' and sys_platform != 'win32')" }, | ||
| { name = "torch", marker = "(python_full_version < '3.11' and sys_platform == 'emscripten') or (python_full_version < '3.11' and sys_platform == 'win32') or (sys_platform != 'emscripten' and sys_platform != 'win32')" }, |
There was a problem hiding this comment.
what in the codex is this?
There was a problem hiding this comment.
It’s from uv’s cross-environment lock. uv locks against a matrix of Python versions and platforms (e.g., win32, emscripten, and “everything else”), then encodes per-environment dependency rules as boolean “markers.” That odd-looking marker on torch is uv’s normalized way of saying “install torch everywhere except on unsupported combos (notably emscripten and sometimes Windows with newer Python).” It isn’t hand-authored code; it’s machine-generated metadata uv uses to decide what to install per environment.
For context, you can see the matrix uv baked into the lock:
resolution-markers = [
"python_full_version >= '3.13' and sys_platform == 'win32'",
"python_full_version == '3.12.*' and sys_platform == 'win32'",
"python_full_version >= '3.13' and sys_platform == 'emscripten'",
"python_full_version == '3.12.*' and sys_platform == 'emscripten'",
"python_full_version >= '3.13' and sys_platform != 'emscripten' and sys_platform != 'win32'",
"python_full_version == '3.12.*' and sys_platform != 'emscripten' and sys_platform != 'win32'",
"python_full_version == '3.11.*' and sys_platform == 'win32'",
"python_full_version == '3.11.*' and sys_platform == 'emscripten'",
"python_full_version == '3.11.*' and sys_platform != 'emscripten' and sys_platform != 'win32'",
"python_full_version < '3.11'",
]
If you want to avoid this cross-platform noise, I can regenerate the lock targeted only to our supported environment (e.g., Linux + CPython 3.13) so these multi-OS markers disappear.
There was a problem hiding this comment.
codex says it's fine / expected
There was a problem hiding this comment.
Yes, that marker is normal in uv.lock.
It’s not from our pyproject.toml, and we didn’t hand-edit it. In this branch the lockfiles are clean, and that marker appears on upstream dependency edges for packages like mlx-lm and xformers.
It simplifies to:
- On normal Linux/macOS: install
numpy - On Windows or Emscripten: install only for Python
<3.11
So for our supported CI/dev targets, it effectively means “yes, numpy”. It’s just uv preserving upstream platform/Python markers in the universal lockfile.



Motivation
packages/rendererspackage by default so consumers only opt in when they need rendering support.rendererspackage so it can be published independently from the root package.Description
"renderers"from the rootdependencieslist inpyproject.tomland add an optional extrarenderers = ["renderers"]under[project.optional-dependencies]so users canpip install verifiers[renderers]to opt in.tool.uv.sourcespointing atpackages/renderersso the package remains available for local development..github/workflows/publish-renderers.ymlthat validatesrenderers-v*tags, checks the tag againstpackages/renderers/pyproject.toml, builds withuv build packages/renderers, and publishes withuv publish --token "$PYPI_TOKEN" packages/renderers/dist/*.Testing
uv run pre-commit installand the install completed successfully.pyproject.tomlcan be parsed withpython - <<'PY' import tomllib; tomllib.load(open('pyproject.toml','rb'))which returned successfully.uv run pre-commit run --all-filesand all configured checks passed.Codex Task
Note
Medium Risk
Medium risk because it changes dependency packaging/import behavior and adds a new automated PyPI release workflow; issues would mainly surface as install/import failures or mis-published renderer releases.
Overview
Adds a new GitHub Actions workflow to publish the
rendererspackage to PyPI onrenderers-v*tags (or manual dispatch), including a tag-to-packages/renderers/pyproject.tomlversion check anduvbuild/publish steps.Makes
renderersan opt-in dependency: removes it from core install, introduces therenderersextra (verifiers[renderers]), and switchesRendererClientto lazy-import with clearer install guidance/errors when the extra isn’t present. Docs are updated to instruct installing the extra before usingclient_type="renderer".Bumps
packages/renderersto0.1.5, adds runtime deps (openai,tiktoken,jinja2,numpy) and dev deps (pytest,pytest-asyncio), and updates lockfiles to reflect publishing/consumingrenderersfrom PyPI rather than a local editable source.Reviewed by Cursor Bugbot for commit 4da3be1. Bugbot is set up for automated code reviews on this repo. Configure here.