Skip to content

Commit 4df9f65

Browse files
Jammy2211Jammy2211claude
authored
nss extras: strip git+https URLs to unblock PyPI uploads (#1286)
* nss extras: strip git+https URLs to unblock PyPI uploads The [nss] extra declared two direct git dependencies for the handley-lab/blackjax fork and yallup/nss. PyPI and TestPyPI both reject these in uploaded wheels with: 400 Can't have direct dependency: blackjax @ git+https://... Last successful PyAutoFit PyPI release was 2026.5.14.2 (May 14, 2026); the [nss] extra was added on May 16 (commit 4d42e55), so every release attempt since has been silently blocked at the twine upload step. This surfaced today when a TestPyPI rehearsal failed the autofit upload while the four downstream libraries (autoconf, autoarray, autogalaxy, autolens) all uploaded fine. The fix preserves the [nss] extra (still installs `fastprogress<1.1`) and documents the manual `pip install git+...` step for the fork-based deps directly in the pyproject.toml comment, so users running `pip install autofit[nss]` see the next step at the source of truth. SHAs are unchanged. Wheel METADATA verified clean — no `git+` strings anywhere. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * ci(nss): install fork blackjax/nss manually post-extras Follow-up to the metadata cleanup in this PR. With the git+ URLs out of pyproject.toml's [nss] extra, `pip install autofit[nss]` no longer auto-installs the handley-lab/blackjax fork or yallup/nss. Both CI jobs that exercise the NSS path now do an explicit `pip install git+...` step after the extras install, matching the documented user workflow. Affected jobs: - main.yml `unittest_nss` matrix (3.12 + 3.13) - nss_install_smoke.yml `fresh_venv_install` SHAs are mirrored from the pyproject.toml comment block, which remains the single source of truth for the pinned commits. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Jammy2211 <JNightingale2211@gmail.com> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 8929df5 commit 4df9f65

3 files changed

Lines changed: 54 additions & 19 deletions

File tree

.github/workflows/main.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,13 @@ jobs:
137137
pip install --upgrade pip
138138
pip install pytest pytest-cov
139139
pip install ./PyAutoConf "./PyAutoFit[nss]"
140+
# blackjax (handley-lab fork) and yallup/nss can't live in the [nss]
141+
# extra — PyPI bans direct git+ URLs in uploaded wheel metadata.
142+
# Install them post-extras instead. SHAs are the single source of
143+
# truth in PyAutoFit/pyproject.toml's [nss] comment — keep in sync.
144+
pip install \
145+
"blackjax @ git+https://github.com/handley-lab/blackjax.git@ef45acd2f2fa0cca15adbdcd3ff7cb3a98987cb5" \
146+
"nss @ git+https://github.com/yallup/nss.git@69159b0f4a3a53123b9eec7df91e4ed3885e4dc4"
140147
- name: Run NSS tests
141148
run: |
142149
export PYTHONPATH=$PWD/PyAutoConf:$PWD/PyAutoFit

.github/workflows/nss_install_smoke.yml

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,20 @@
11
name: NSS install smoke
22

3-
# Phase 4 of nss_first_class_sampler — verifies that `pip install autofit[nss]`
4-
# remains a single safe command. Runs on every PR (so we catch local regressions
5-
# in pyproject.toml before merging) and on a weekly cron (so we catch upstream
6-
# regressions in handley-lab/blackjax or yallup/nss that drift past the pinned
7-
# SHAs).
3+
# Phase 4 of nss_first_class_sampler — verifies that the documented two-step
4+
# install (`pip install autofit[nss]` followed by the manual `pip install
5+
# git+...` for the handley-lab/blackjax fork and yallup/nss) lands a working
6+
# NSS environment.
7+
#
8+
# Why two steps: PyPI bans `git+https://` URLs in uploaded wheel metadata
9+
# (rejection: "400 Can't have direct dependency"), so the fork-based deps
10+
# cannot live in pyproject.toml's [nss] extra. The SHAs themselves are
11+
# documented in PyAutoFit/pyproject.toml just above the [nss] entry — keep
12+
# the two in sync.
13+
#
14+
# Runs on every PR (so we catch local regressions in pyproject.toml or in
15+
# the documented manual install before merging) and on a weekly cron (so we
16+
# catch upstream regressions in handley-lab/blackjax or yallup/nss that
17+
# drift past the pinned SHAs).
818

919
on:
1020
pull_request:
@@ -37,6 +47,14 @@ jobs:
3747
run: python -m pip install -e PyAutoConf
3848
- name: Install PyAutoFit with [nss] extra
3949
run: python -m pip install -e PyAutoFit[nss]
50+
- name: Install handley-lab/blackjax and yallup/nss (manual, post-extras)
51+
# Mirrors the documented two-step install path. Keep these SHAs in
52+
# sync with the block at the top of PyAutoFit/pyproject.toml's [nss]
53+
# comment — that's the single source of truth.
54+
run: |
55+
python -m pip install \
56+
"blackjax @ git+https://github.com/handley-lab/blackjax.git@ef45acd2f2fa0cca15adbdcd3ff7cb3a98987cb5" \
57+
"nss @ git+https://github.com/yallup/nss.git@69159b0f4a3a53123b9eec7df91e4ed3885e4dc4"
4058
- name: Import smoke
4159
run: |
4260
python -c "

pyproject.toml

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -76,23 +76,33 @@ optional = [
7676
"nautilus-sampler==1.0.5",
7777
"zeus-mcmc==2.5.4",
7878
]
79-
# Phase 4 of nss_first_class_sampler — single safe install for `af.NSS`.
80-
# Pins the `handley-lab/blackjax` fork (BSD-3-Clause) which carries the
81-
# `blackjax.ns.adaptive.init` entrypoint that mainline blackjax lacks,
82-
# plus `yallup/nss` (BSD-3-Clause) on top. Both pinned to specific SHAs
83-
# so installs are reproducible. `fastprogress<1.1` keeps `fastprogress`
79+
# Phase 4 of nss_first_class_sampler — support package for `af.NSS`.
80+
#
81+
# The `handley-lab/blackjax` fork (BSD-3-Clause) carries the
82+
# `blackjax.ns.adaptive.init` entrypoint that mainline blackjax lacks, and
83+
# `yallup/nss` (BSD-3-Clause) sits on top. Both are pinned to specific SHAs
84+
# below — but installed manually rather than declared here, because PyPI and
85+
# TestPyPI reject direct `git+https://` URLs in uploaded wheels with:
86+
#
87+
# 400 Can't have direct dependency: blackjax @ git+...
88+
#
89+
# After `pip install autofit[nss]`, complete the install with:
90+
#
91+
# pip install \
92+
# "blackjax @ git+https://github.com/handley-lab/blackjax.git@ef45acd2f2fa0cca15adbdcd3ff7cb3a98987cb5" \
93+
# "nss @ git+https://github.com/yallup/nss.git@69159b0f4a3a53123b9eec7df91e4ed3885e4dc4"
94+
#
95+
# blackjax SHA `ef45acd2` is the May 2026 "Merge PR #60 — double_compile"
96+
# revision, locally validated against the Phase 1-3 work. blackjax HEAD
97+
# (5dbf89a9 at pin time) introduced `numpy>=1.25`, which conflicts with
98+
# autofit's `anesthetic==2.8.14` (numpy<2.0) — bump only after both pins
99+
# move together. See PyAutoPrompt/issued/nss_install_simplification.md
100+
# notes #3-4 for context.
101+
#
102+
# `fastprogress<1.1` stays here as a regular PyPI dep — it keeps fastprogress
84103
# from pulling `python-fasthtml` (1.1.5 transitively requires it).
85-
# Re-pin SHAs periodically — see `autofit/install_nss.py` for the manual
86-
# fallback when pip's resolver cannot sequence the URL deps cleanly.
87104
nss = [
88105
"fastprogress<1.1",
89-
# blackjax pinned to ef45acd2 (May 2026 "Merge pull request #60 — double_compile").
90-
# Locally-validated against the entire Phase 1-3 nss_first_class_sampler work.
91-
# HEAD as of pin time (5dbf89a9) introduced `numpy>=1.25` which conflicts with
92-
# autofit's `anesthetic==2.8.14` (numpy<2.0). Bump only after both pins move
93-
# together — see PyAutoPrompt/issued/nss_install_simplification.md notes #3-4.
94-
"blackjax @ git+https://github.com/handley-lab/blackjax.git@ef45acd2f2fa0cca15adbdcd3ff7cb3a98987cb5",
95-
"nss @ git+https://github.com/yallup/nss.git@69159b0f4a3a53123b9eec7df91e4ed3885e4dc4",
96106
]
97107
docs=[
98108
"sphinx",

0 commit comments

Comments
 (0)