Skip to content

Dev -> main - #273

Merged
lauraluebbert merged 8 commits into
mainfrom
dev
Oct 1, 2026
Merged

lauraluebbert merged 8 commits into
mainfrom
dev

Conversation

@lauraluebbert

Copy link
Copy Markdown
Collaborator

No description provided.

lauraluebbert and others added 8 commits June 28, 2026 19:08
…) (#266)

cellxgene-census now returns an AnnData whose .layers exposes a None key,
which repr_dict surfaced as 'layers': [None] and broke the structural
comparison in test_cellxgene_adata. repr_dict now ignores None keys, so the
comparison stays on meaningful (named) elements and is robust to this
upstream drift. Adds a network-free TestReprDict test that guards the
behavior on every Python version (the live Census tests skip where
cellxgene-census has no wheel).

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…#261)

* feat(utils): retry transient errors in rest_query/post_query

Ensembl REST and other upstream services occasionally return transient
5xx (500/502/503/504) or 429 responses, or drop the connection under
load. Every Ensembl-backed module (seq, ref, search, info, blat, and
enrichr with ensembl=True) routes through rest_query/post_query, so a
single transient blip currently fails the whole call.

Add a small _query_with_retry helper and route both functions through
it:
- Retries on 429/5xx and on connection/timeout errors, with linear
  backoff (2s, 4s, 6s).
- Honors a Retry-After header when the server sends one (capped at 30s).
- Does NOT retry 4xx client errors (e.g. 404) — those are returned to
  the caller unchanged, preserving existing error handling.
- After exhausting retries, returns the last response (or re-raises the
  last connection error) so callers behave exactly as before.

Add offline unit tests (TestQueryRetry) covering success-after-retry,
connection-error retry, no-retry on 404, retry exhaustion, and
Retry-After handling.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* test: report the 25 slowest tests via pytest --durations

Add `--durations=25` to pytest addopts so every CI run prints the slowest
tests at the end of the log. This makes it easy to spot which (mostly
network-bound) tests dominate CI wall-clock time, complementing the
request-retry changes in this PR.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@lauraluebbert
lauraluebbert merged commit de3d2d2 into main Oct 1, 2026
3 of 7 checks passed
@lauraluebbert
lauraluebbert deleted the dev branch October 1, 2026 13:03
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.

3 participants