From fed1c327e0efbf33878f85d8d3b5aedb25fab0b1 Mon Sep 17 00:00:00 2001 From: Cambridge Yang Date: Sun, 24 May 2026 00:24:54 -0400 Subject: [PATCH] CI: install with uv; consume jet-array 0.1.0a2 from PyPI The tests workflow installed with plain pip, which ignores the [tool.uv] overrides/sources, so it pulled stable tensorflow-probability and crashed at collection on jax.interpreters.xla.pytype_aval_mappings (and the 3.10 matrix entry couldn't even install, since requires-python is >=3.11). - test.yml: install via `uv sync --extra test --locked` + `uv run` so the oryx git source and the tfp-nightly override/constraint apply; drop 3.10 from the matrix. - pyproject: drop the stale 3.10 classifier; pin jet-array==0.1.0a2 (now on PyPI with the log-space Taylor expansion, pow_p/scan_p rules, and log_add NaN-gradient guard) and remove its git source from [tool.uv.sources]. - uv.lock: jet-array now resolves from the PyPI registry. Verified locally: `uv sync --locked` clean, 77 tests collect with no import errors, representative subset passes. --- .github/workflows/test.yml | 18 +++++++++--------- pyproject.toml | 13 +++++-------- uv.lock | 10 +++++++--- 3 files changed, 21 insertions(+), 20 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c04b161..d1c556e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,5 +1,7 @@ -# Requires jet-array to be installable from PyPI. -# Publish jet-array first (tag v0.1.0 on thisiscam/jet-array → CI auto-publishes). +# Installs with uv so the [tool.uv] overrides apply: the oryx/jet-array git +# sources, the dropped stable tensorflow-probability, and the tfp-nightly pin +# that keeps `jax.interpreters.xla.pytype_aval_mappings` available. Plain pip +# ignores those blocks and the import crashes, so do NOT switch back to pip. name: tests on: @@ -14,16 +16,14 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.10", "3.11", "3.12"] + python-version: ["3.11", "3.12"] # pyproject requires-python = ">=3.11" steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 + - uses: astral-sh/setup-uv@v5 with: python-version: ${{ matrix.python-version }} - cache: pip + enable-cache: true - name: Install - run: | - python -m pip install --upgrade pip - pip install -e ".[test]" + run: uv sync --extra test --locked - name: Run tests - run: pytest -v + run: uv run --extra test python -m pytest -v diff --git a/pyproject.toml b/pyproject.toml index 7c31528..49e2839 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,14 +25,13 @@ classifiers = [ "Intended Audience :: Science/Research", "Operating System :: OS Independent", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Topic :: Scientific/Engineering :: Mathematics", ] dependencies = [ "jax>=0.8,<0.9", - "jet-array==0.1.0a1", + "jet-array==0.1.0a2", "jaxopt>=0.8", "optimistix>=0.0.6", "quadax>=0.2.9", @@ -87,12 +86,10 @@ constraint-dependencies = [ # upstream fix lands. [tool.uv.sources] oryx = { git = "https://github.com/thisiscam/oryx.git", branch = "copulaad_support" } -# PyPI's jet-array==0.1.0a1 predates the log-space Taylor expansion -# (sign, log|c|) representation that `bell.py`'s `log_jet=True` path -# uses, and also predates the log_add NaN-gradient shift-guard at -# structural zeros. Pin to the public fork until a new wheel is -# released. -jet-array = { git = "https://github.com/thisiscam/jet-array.git", branch = "main" } +# jet-array 0.1.0a2 (PyPI) ships the log-space Taylor expansion (sign, log|c|) +# that bell.py's log_jet=True path uses, plus the pow_p/scan_p jet rules and the +# log_add structural-zero NaN-gradient guard — so the published wheel now +# suffices and no git source is needed. [tool.hatch.build.targets.wheel] packages = ["acopula"] diff --git a/uv.lock b/uv.lock index a6747c4..5de125b 100644 --- a/uv.lock +++ b/uv.lock @@ -62,7 +62,7 @@ requires-dist = [ { name = "jax", specifier = ">=0.8,<0.9" }, { name = "jax", extras = ["cuda12"], marker = "platform_machine == 'x86_64' and sys_platform == 'linux' and extra == 'gpu'", specifier = ">=0.8,<0.9" }, { name = "jaxopt", specifier = ">=0.8" }, - { name = "jet-array", git = "https://github.com/thisiscam/jet-array.git?branch=main" }, + { name = "jet-array", specifier = "==0.1.0a2" }, { name = "matplotlib", marker = "extra == 'examples'", specifier = ">=3.7" }, { name = "mpmath", marker = "extra == 'test'", specifier = ">=1.3" }, { name = "networkx", marker = "extra == 'examples'", specifier = ">=3" }, @@ -448,12 +448,16 @@ wheels = [ [[package]] name = "jet-array" -version = "0.1.0a1" -source = { git = "https://github.com/thisiscam/jet-array.git?branch=main#d2e770100913524cb1a4f2edc088b495e18233c2" } +version = "0.1.0a2" +source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "jax" }, { name = "numpy" }, ] +sdist = { url = "https://files.pythonhosted.org/packages/25/cb/4786ef3dbcb53a7336bbedc386bcf094e462f317497dcfb21d2b38a933b0/jet_array-0.1.0a2.tar.gz", hash = "sha256:846dafec7d95cfeb798ed34db4a3413c744dbb2693c28a69eb322f44a367ee4d", size = 82386, upload-time = "2026-05-24T04:23:19.224Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/43/6e/37cb3079cdf5f9a716c6e4115d17a24b7599755bd688ca70b1c9115396fb/jet_array-0.1.0a2-py3-none-any.whl", hash = "sha256:6fa3cc8a83b7a77a530f77e49a61cb21fbc9d74aa7f953a53c99765c492cbf9a", size = 44985, upload-time = "2026-05-24T04:23:17.838Z" }, +] [[package]] name = "kiwisolver"