Skip to content

feat(reactome): add gget reactome module to query the Reactome pathway database (#114)#236

Draft
Elarwei001 wants to merge 3 commits into
scverse:devfrom
Elarwei001:feature/reactome-114
Draft

feat(reactome): add gget reactome module to query the Reactome pathway database (#114)#236
Elarwei001 wants to merge 3 commits into
scverse:devfrom
Elarwei001:feature/reactome-114

Conversation

@Elarwei001

Copy link
Copy Markdown
Contributor

Resolves #114

Summary

gget reactome: New module to query the Reactome pathway knowledgebase via its ContentService REST API. Supports three query types via the resource argument: pathways (the Reactome pathways an identifier such as a UniProt accession participates in), search (full-text search of the knowledgebase), and entity (details for a Reactome stable ID). Resolves issue 114.

Testing

Unit tests in tests/test_reactome.py (offline argument-validation via tests/fixtures/test_reactome.json plus release-robust network smoke tests that skip when Reactome is unreachable); run with pytest.

Elarwei001 and others added 2 commits June 24, 2026 22:51
…y database (scverse#114)

New module `gget reactome` (Python API + CLI) querying the Reactome
ContentService REST API (https://reactome.org/). Supports three query
types via the `resource` argument:
  - pathways (default): the Reactome pathways an identifier (e.g. a
    UniProt accession) participates in
  - search: full-text search of the Reactome knowledgebase
  - entity: details for a Reactome stable ID

Returns a pandas DataFrame (or JSON with json=True / --csv on the CLI).
Reuses the shared http_json helper for retries/error handling, strips
HTML highlight tags from search results, and maps Reactome 404s to empty
results (pathways/search) or a clear ValueError (entity).

Adds unit tests (offline argument validation via fixture + release-robust
network smoke tests that skip when Reactome is unreachable), docs page
docs/src/en/reactome.md, a SUMMARY.md entry, and an updates.md note.

Resolves scverse#114.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@codecov-commenter

codecov-commenter commented Jun 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.84946% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 56.93%. Comparing base (5cf607f) to head (400a044).
⚠️ Report is 1 commits behind head on dev.

Files with missing lines Patch % Lines
gget/gget_reactome.py 97.82% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #236      +/-   ##
==========================================
+ Coverage   56.14%   56.93%   +0.79%     
==========================================
  Files          29       30       +1     
  Lines        9244     9337      +93     
==========================================
+ Hits         5190     5316     +126     
+ Misses       4054     4021      -33     

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

Add a network-free TestReactomeOffline class that mocks http_json to
cover _strip_html passthrough, the pathways/search/entity parsing,
verbose logging, 404 and non-404 error branches, the entity name
fallback/summation, and resource/query validation. gget_reactome.py now
98% (only the import-time PackageNotFoundError version fallback, lines
16-17, remains, which is un-coverable in an installed environment).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@Elarwei001 Elarwei001 marked this pull request as draft June 25, 2026 03:44
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