Skip to content

Require ASSIST >= 1.2.3 - #40

Merged
wilsonbb merged 1 commit into
mainfrom
coc/pin-assist
Nov 6, 2026
Merged

wilsonbb merged 1 commit into
mainfrom
coc/pin-assist

Conversation

@wilsonbb

@wilsonbb wilsonbb commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Ponder gets ASSIST only through Sorcha, and Sorcha declares assist and rebound with no version bounds (checked in the Sorcha 1.1.1 and 1.2.1 wheel metadata). The integrator version in a Ponder environment is therefore whatever pip resolved on the day the environment was built. This PR adds a direct lower bound, assist >= 1.2.3, so a new environment cannot silently come up with an older integrator.

1.2.3 is the version in the environments we run Ponder from today (with REBOUND 4.6.0). Through its own metadata it requires rebound >= 4.4.11, < 5.0.0, so this also keeps REBOUND off the 5.x line, which ASSIST has not been tested against. Ponder doesn't need its own REBOUND pin.

ASSIST changes that matter for ephemeris accuracy

I compared the PyPI source distributions for 1.1.9, 1.1.11, 1.2.0, 1.2.1, 1.2.2 and 1.2.3. GitHub's v1.2.0, v1.2.1 and v1.2.2 tags all point to the same commit, so they don't identify release contents.

Sorcha's path through ASSIST: it builds assist.Ephem(planets_path=..., asteroids_path=...) from linux_p1550p2650.440 (DE440) and sb441-n16.bsp, wraps the REBOUND simulation in assist.Extras, and evaluates each light-time iteration with ex.integrate_or_interpolate(t - lt).

  • 1.1.9 → 1.1.11: ephemeris failures stop the integration. Before 1.1.11, a failed planet or asteroid lookup (for example a time outside kernel coverage) only logged an error, and the force calculation carried on with whatever values it had. Since 1.1.11, forces.c sets REB_STATUS_GENERIC_ERROR and returns, so the integration halts instead of producing a quietly wrong trajectory.
    • This release also fixes the buffers integrate_or_interpolate allocates: they were 6× too large and are now initialised from sim->particles. I don't expect this to change positions.
    • It also generalises the non-gravitational g(r) law. The defaults (α = 1, nk = 0, nm = 2, r₀ = 1) reduce to the old 1/r², so results with A1 = A2 = A3 = 0 (what Sorcha uses) are unchanged.
  • 1.1.11 → 1.2.0: planet-ephemeris refactor.
    • Adds NAIF SPK (.bsp) planet kernels alongside the JPL binary .440/.441 files, with auto-detection.
    • Ephemeris constants (AU, EMRAT, J2E/J3E/J4E, J2SUN, RE, CLIGHT, ASUN) now live on the ephemeris object, and c² is precomputed.
    • For the .440 file Sorcha passes, the constants are still read from the file header, and the force expressions are the same apart from that refactor. I expect identical results to rounding, but I have not run an old-vs-new numerical comparison.
    • When no planets path is given, ASSIST now searches ASSIST_DIR for de441.bsp, de440.bsp, .441 and then .440. Sorcha always passes an explicit path, so this doesn't affect it.
  • 1.2.0 → 1.2.3: no numerical change. assist.c changes only in its version string. The one functional change is the rebound < 5.0.0 cap added in 1.2.3.

Known limitation in 1.2.3, partly fixed on main but not released

In 1.2.3, assist_integrate_or_interpolate only prints Error: cannot interpolate beyond timestep bounds (or ... before first timestep is complete) when it can't interpolate. It doesn't raise, and it leaves the particle state as it was, so the caller can read stale positions with no Python-level signal.

Two fixes merged on 2026-06-21 aren't in any PyPI release yet (the latest is 1.2.3, uploaded 2026-05-17):

The coverage case doesn't arise for Ponder's epochs: DE440 and sb441-n16 jointly cover roughly 1550–2650. Until a release includes these fixes, grep Sorcha logs for cannot interpolate to check a run. Once one ships, this lower bound should move up to it.

Testing

  • pyproject.toml parses, and the dependency list is astropy, pandas < 3.0, sorcha, assist >= 1.2.3, tqdm, pyarrow.
  • ASSIST 1.2.3 is on PyPI. It ships as an sdist only, as all recent ASSIST releases do, so installing it builds from source as before.
  • Existing environments with ASSIST 1.2.3 and REBOUND 4.6.0 already satisfy the bound.
  • I have not built a fresh environment from this branch; CI will exercise the install.

🤖 Generated with Claude Code

Sorcha depends on assist with no version bound, so the integrator version
was whatever pip resolved when an environment was built.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Nov 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.70%. Comparing base (ec4d601) to head (bc44509).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #40   +/-   ##
=======================================
  Coverage   84.70%   84.70%           
=======================================
  Files           5        5           
  Lines        1327     1327           
=======================================
  Hits         1124     1124           
  Misses        203      203           

☔ 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.

@wilsonbb
wilsonbb requested review from connolly, drewoldag and maxwest-uw and removed request for connolly and maxwest-uw November 6, 2026 22:24

@drewoldag drewoldag left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasoanble.

@wilsonbb
wilsonbb merged commit f937ff6 into main Nov 6, 2026
6 checks passed
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