fix(ci): repair dev live-data test failures#252
Draft
Elarwei001 wants to merge 7 commits into
Draft
Conversation
…0 fix)
OpenTargets changed the Drug 'synonyms' and 'tradeNames' fields from
[String!]! to the object type [DrugLabelAndSource!]!, which now requires
a sub-selection. The bare-scalar selection caused every drug query to
fail with HTTP 400.
Request '{ label }' for both fields and flatten the response objects
back to a list of label strings so downstream output stays
backward-compatible (a list of strings).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ev-drift) ARCHS4's tissue-expression CSV intermittently omits the 'color' column, which made `gget archs4 --which tissue` crash with `KeyError: "['color'] not found in axis"`. The 'color' column is only used for plotting upstream and is dropped (never used) by gget, so a missing column should not be fatal. Use `drop(columns=["color"], errors="ignore")` so the request degrades gracefully when the column is absent. Adds network-free regression tests covering both the present-color and missing-color responses. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
OpenTargets retired the `target.expressions` field (it now returns an empty
list for every gene), so `gget opentargets -r expression` returned nothing.
Baseline expression data moved to the paginated `target.baselineExpression`
field with a new per-biosample data model.
- Repoint the expression query to `baselineExpression(page:{index:0,size:250})
{ rows {...} }` and update rows_path to ["baselineExpression","rows"].
- Output columns change accordingly (per-biosample summary stats: median/min/
q1/q3/max/unit + tissueBiosample/celltypeBiosample ids + datasource/datatype),
because the upstream data model changed and the old shape no longer exists.
- Remove the two now-invalid live exact-match fixtures and replace them with
network-free mocked tests; update docs (example, resource table, updates.md).
Verified live: http_json with the new query returns 1409 rows in ~0.6s and the
parsing pipeline yields the documented columns.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…t (data drifts across releases) OpenTargets is a live database re-released regularly; several opentargets tests pinned exact current values (disease ids/scores, result hashes, interaction partner ids, genotypes) that legitimately change every release, so they failed on unrelated PRs even though gget returns correct current data. Replace the exact-value/hash assertions for test_opentargets, _diseases, _depmap, _depmap_filter, _interactions, _interactions_no_limit and _pharmacogenetics with structural/invariant assertions (expected columns present, numeric dtypes, value-format patterns — ontology-curie disease/tissue ids, ENSG interaction partners, ACH DepMap ids, score in [0,1], nucleotide genotypes — and the depmap filter invariant). The fixture entries are marked `code_defined`; the structural methods live in tests/test_opentargets.py. These stay meaningful (they break on wrong columns, malformed ids, non-numeric scores, broken filtering, or empty-where-guaranteed) without pinning drifting data. Verified live against current OpenTargets data. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #252 +/- ##
==========================================
+ Coverage 56.14% 56.40% +0.25%
==========================================
Files 29 29
Lines 9244 9253 +9
==========================================
+ Hits 5190 5219 +29
+ Misses 4054 4034 -20 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
Author
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
This draft consolidates the CI/test-stability fixes for the current
devhatch-test failures into one branch so the GitHub test matrix can be evaluated in a single PR.Included fixes:
synonymsandtradeNamesso the live drugs query no longer returns HTTP 400, then flatten those fields back to lists of labels to preserve the existing gget output shape.color; keep required expression columns and sorting.Not included:
resource="expression"is not migrated tobaselineExpressionin this PR. That would change user-visible output semantics for the same call signature, so it remains a separate design question tracked in gget opentargets -r expression returns empty: OpenTargets retired target.expressions (data moved to baselineExpression) #247.target.expressionscurrently returns no rows; the skip message points to gget opentargets -r expression returns empty: OpenTargets retired target.expressions (data moved to baselineExpression) #247 rather than silently changing gget semantics inside this CI-repair PR.Live contracts being tested
id/min/q1/median/q3/max, numeric quartile ordering, median-descending sort, and no dependency on optionalcolor.Local verification
Passing locally:
The two skipped tests are the known OpenTargets expression upstream break tracked in #247.
Related
baselineExpression.