Skip to content

Offer several bilby versions, with a picker on the page - #1

Merged
ColmTalbot merged 1 commit into
mainfrom
bilby-versions
Oct 21, 2026
Merged

ColmTalbot merged 1 commit into
mainfrom
bilby-versions

Conversation

@ColmTalbot

Copy link
Copy Markdown

Summary

The page now offers bilby 2.8.2 (the default), 2.7.1, 2.6.0 and main. Pick one with the picker in the header (on phones it's in the example drawer) or with ?bilby=<name> in the URL. Switching restarts Python with that version and keeps the open example, including any edits, so the same script can be run against two versions. An example that the new version doesn't have stays open, using its data files from the version it came from.

How it works

  • bilby-versions.json replaces bilby-commit.txt. Each version is pinned to a commit, and releases also name their tag, which the fetch script checks. scripts/fetch-bilby.sh --update still moves main.
  • scripts/fetch-bilby.sh builds one wheel per version (cached in .cache/bilby-wheels/<commit>/), extracts and adapts examples/<name>/, and writes examples/versions.json for the page.
  • packages.lock.json now locks the bilby group once per version. 2.6.0 needs dynesty<2.2, so it pins dynesty==2.1.5; the other versions keep 3.1.0. The extra groups (LALSuite, gwpy, …) are resolved against every version, must come out the same, and are locked once. The lock for main is unchanged.
  • Everything else is shared: LALSuite, the PyPI wheels, Pyodide and the page code. Each extra version adds about 2 MB of wheel plus its examples.
  • The worker gets its version from its URL (worker.js?v=…&bilby=…). The cache-busting ?v= on shared files doesn't change between versions, so they are downloaded and cached once.

Tests

  • scripts/test-all.mjs tests every version by default, or one with --bilby <name>. tests/known-failures.json lists failures under all or under a version's name.
  • CI runs one test job per version, with the matrix read from bilby-versions.json. The Playwright smoke test runs with BILBY_VERSION set and gains a test that switches versions with the picker.
  • Release-only known failures:
    • All three releases: calibration_marginalization_example (reweighting always opens a multiprocessing.Pool).
    • 2.8.2 and 2.7.1: marginalized_likelihood (KeyError: 'time_jitter').
    • multivariate_gaussian_prior fails on every version, so it moves to all.
  • Run locally: 2.8.2 and 2.7.1 passed 29 of 42 examples and 2.6.0 passed 30 and main passed 31, with every failure being a known one. In the browser I checked switching versions, keeping edits, the missing-example fallback and the phone layout. I haven't run the Playwright suite locally; CI runs it.

Note

The default is now the latest release (2.8.2) rather than main. Change default in bilby-versions.json to go back.

🤖 Generated with Claude Code

The page now offers bilby 2.8.2 (the default), 2.7.1, 2.6.0 and main,
listed in bilby-versions.json (which replaces bilby-commit.txt). The
picker in the header, or ?bilby=<name> in the URL, chooses one; switching
restarts Python with that version and keeps the open example, with any
edits.

- scripts/fetch-bilby.sh builds a wheel and extracts the examples for
  each version (examples/<name>/) and writes examples/versions.json.
- packages.lock.json locks the bilby group per version (2.6.0 needs
  dynesty 2.1.5); the other groups are resolved against every version,
  must agree, and are locked once. LALSuite, the PyPI wheels and the page
  are shared by all versions.
- scripts/test-all.mjs and test-examples.mjs take --bilby; CI tests each
  version in its own job, and known failures can be listed per version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ColmTalbot
ColmTalbot merged commit b8c3e41 into main Oct 21, 2026
5 checks passed
@ColmTalbot
ColmTalbot deleted the bilby-versions branch October 21, 2026 17:49
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.

1 participant