Skip to content

Install every runtime dependency from archive URLs, not git - #328

Merged
stevevanhooser merged 1 commit into
mainfrom
archive-urls-no-git
Oct 14, 2026
Merged

stevevanhooser merged 1 commit into
mainfrom
archive-urls-no-git

Conversation

@stevevanhooser

Copy link
Copy Markdown
Contributor

Goal

Installing ndi should not need git on the user's machine. The double-click installer we're building is based on uv tool install. For git+ URLs, uv shells out to a system git, and end users (especially on Windows and macOS) often don't have one. GitHub archive (zip) URLs are fetched over plain HTTPS instead. #326 already switched the two vhlab-* dependencies. This PR switches the remaining four.

Changes

pyproject.toml: four dependency lines

"did @ https://github.com/VH-Lab/DID-python/archive/refs/heads/main.zip",
"ndr[formats] @ https://github.com/VH-lab/NDR-python/archive/refs/heads/main.zip",
"ndi-compress @ https://github.com/Waltham-Data-Science/NDI-compress-python/archive/refs/heads/main.zip",
"ndi-ontology @ https://github.com/Waltham-Data-Science/ndi-ontology-python/archive/refs/heads/main.zip",

The extras and package names are unchanged. After this change, grep 'git+' pyproject.toml finds nothing, in either [project.dependencies] or any extra. No sibling package depends on these four, so there are no cross-repo URLs to keep in step. A docstring in tests/test_intan_blockinfo_arity.py quoted the old git+ pin; it now quotes the archive URL. The point it makes still holds, because the archive still tracks main.

New CI job: Install without git (in ci.yml)

Runs on ubuntu-latest, on the same triggers as the other jobs (pull_request, and push to main):

  • installs uv with astral-sh/setup-uv@v6, pinned to uv 0.11.32, with the cache turned off;
  • puts a git stub that always fails ahead of the real git on PATH, and checks that git --version fails before going any further;
  • runs uv venv --python 3.12, then uv pip install ".[tutorials]" from the checked-out tree. [tutorials] brings in pandas and matplotlib, which ndi check looks for;
  • imports ndi, did, ndr, vlt, vhlib, ndicompress, ndi_ontology;
  • runs python -m ndi check from outside the checkout, so it tests the installed wheel.

The job exists so that a git+ dependency added back later (directly or through an extra we install) fails CI rather than failing on a user's machine.

Notes

  • Updating an existing install: uv caches archive URLs by URL. Picking up a newer main therefore needs --reinstall or --refresh (for example uv tool install --reinstall ndi ... or uv pip install --refresh ...).
  • Still needs git after this PR:
    • ndi_install.py still clones NDIcalc-vis-matlab and Pyraview. Those are separate upcoming steps.
    • NDR's optional [ced] extra (sonpipe) still uses git. NDI doesn't request it, and it is being fixed in a separate NDR-python PR.
  • Testing:
    • This sandbox's network policy returns 403 for github.com/.../archive/... downloads. I could not test the archive-URL install locally; the new CI job is the real test.
    • Locally, I did confirm that the git stub makes git --version fail and that uv then stops on the 403 rather than trying git.
    • With the dependencies installed from local clones instead: ndi check passes all 19 checks, and the full suite gives 5791 passed, 698 skipped. black and ruff are clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_013Te2MAzqGZo8MQ4V788DkB


Generated by Claude Code

Switch did, ndr[formats], ndi-compress and ndi-ontology from git+ URLs to
GitHub archive (zip) URLs, so installing ndi needs no git on the user's
machine. Add a CI job that installs with git shadowed by a failing stub,
so a git+ dependency cannot sneak back in unnoticed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Te2MAzqGZo8MQ4V788DkB
@stevevanhooser
stevevanhooser merged commit 6f481e4 into main Oct 14, 2026
10 checks passed
@stevevanhooser
stevevanhooser deleted the archive-urls-no-git branch October 14, 2026 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants