Skip to content

Update vendored xsf from v0.1.3 to v0.2.0#843

Merged
jobovy merged 1 commit into
mainfrom
copilot/update-galpy-xsf-version
Mar 27, 2026
Merged

Update vendored xsf from v0.1.3 to v0.2.0#843
jobovy merged 1 commit into
mainfrom
copilot/update-galpy-xsf-version

Conversation

Copilot AI commented Mar 27, 2026

Copy link
Copy Markdown
Contributor

Updates the vendored xsf library (SciPy's special functions) from v0.1.3 to v0.2.0, focusing only on the files required for galpy's usage of xsf (the hyp2f1 hypergeometric function used in TwoPowerSphericalPotential and TwoPowerTriaxialPotential).

Changes

Only 4 of the 25 vendored files changed between v0.1.3 and v0.2.0 (verified by comparing git blob SHAs). The changes are:

xsf/include/xsf/hyp2f1.h — Adds NaN input check (scipy/xsf#95): Returns NaN immediately when any input argument is NaN.

xsf/include/xsf/cephes/const.h — Fixes incorrect constant values/names (scipy/xsf#100):

  • Corrects SQRT2PI from 0.79788... (wrong: that's sqrt(2/pi)) to 2.5066... (correct: sqrt(2*pi))
  • Removes the incorrectly named SQRTPI constant (which was actually sqrt(2*pi))
  • Updates other constants with more precise values
  • Fixes LOGSQRT2PI comment

xsf/include/xsf/cephes/gamma.h — Updates to use renamed SQRT2PI constant (one-line change, consequence of the const.h fix).

xsf/include/xsf/cephes/hyp2f1.h — Adds special case for a == -1 (scipy/xsf#85), fixing incorrect results for that input.

Testing

  • All 4 updated files verified to match v0.2.0 git blob SHAs exactly
  • pre-commit hooks pass on changed files
  • Build succeeds with no errors
  • TwoPowerSphericalPotential functionality verified

Security Summary: No security vulnerabilities found (CodeQL scan: 0 alerts).

@codecov

codecov Bot commented Mar 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.91%. Comparing base (ed11f05) to head (77acb7c).
⚠️ Report is 105 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #843   +/-   ##
=======================================
  Coverage   99.91%   99.91%           
=======================================
  Files         221      221           
  Lines       31877    31877           
  Branches      662      662           
=======================================
  Hits        31850    31850           
  Misses         27       27           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jobovy jobovy marked this pull request as ready for review March 27, 2026 02:42
@jobovy jobovy merged commit 86cddc6 into main Mar 27, 2026
144 checks passed
@jobovy jobovy deleted the copilot/update-galpy-xsf-version branch March 27, 2026 03:18
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