build: move vesin[torch] to the torch extra (fix conda-forge)#5501
Conversation
vesin's torch bindings ship as a separate PyPI package (vesin-torch, pulled in by the vesin[torch] extra). conda-forge packages vesin but not vesin-torch, so listing vesin[torch] in the core dependencies breaks the conda-forge build. Move it under the torch optional-dependency extra (get_pt_requirement), so only deepmd-kit[torch] (pip) pulls it; the runtime already guards usage via is_vesin_torch_available().
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughThe PR relocates the ChangesConditional vesin[torch] dependency handling
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #5501 +/- ##
==========================================
- Coverage 81.42% 81.41% -0.01%
==========================================
Files 871 871
Lines 96951 96952 +1
Branches 4240 4241 +1
==========================================
- Hits 78941 78938 -3
- Misses 16707 16711 +4
Partials 1303 1303 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Summary
vesin's torch bindings ship as a separate PyPI package (vesin-torch, pulled in by thevesin[torch]extra). conda-forge packagesvesinbut notvesin-torch, so listingvesin[torch]in the coredependencies(added in #5491) breaks the conda-forge build of the basedeepmd-kitpackage.This moves
vesin[torch]out of the core dependencies and into thetorchoptional-dependency extra (backend/find_pytorch.get_pt_requirement), so onlydeepmd-kit[torch](pip) pulls it. The neighbor-list runtime already guards usage viais_vesin_torch_available(), andnlist_backend="auto"falls back to the native builder when vesin is absent, so this is behavior-preserving for installs that don't ship the torch extra.Changes
pyproject.toml: dropvesin[torch]from coredependencies.backend/find_pytorch.py: addvesin[torch]to thetorchextra.Known limitations
pip install deepmd-kit[torch]resolution and the conda-forge recipe build are not exercised in CI here).torchextra is empty and vesin is not installed (intended).Summary by CodeRabbit