🧪 Add mocked tests for name2uniprot in pathwaycommons - #58
Conversation
Co-authored-by: akutuva21 <44119804+akutuva21@users.noreply.github.com>
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Co-authored-by: akutuva21 <44119804+akutuva21@users.noreply.github.com>
akutuva21
commented
Apr 13, 2026
Superseded by #60 pathwaycommons HTTPError test coverage. |
Understood. Acknowledging that this work is superseded and stopping work on this task. |
Drop distutils for Python 3.12 compatibility (closes#58)
Packaging (B3): add extras_require={"bngsim": ["bngsim>=0.9.10"]} so the
optional in-process engine is discoverable via `pip install bionetgen[bngsim]`,
while keeping bngsim out of install_requires (never a hard dependency). The
extra's floor matches MINIMUM_BNGSIM_VERSION in the bridge.
Bridge: bump MINIMUM_BNGSIM_VERSION 0.6.0 -> 0.9.10. 0.9.0 settled the
method-independent gdat/scan output schema (bngsim #58) the parity differ
normalizes against; 0.9.10 is the current validated release. Refresh the
floor-rationale comment, which still cited the stale 0.6.0/#40 reason.
Update the version-guard test's minimum-version case to 0.9.10.
With bngsim absent the bridge soft-imports to the legacy subprocess path
unchanged; the bngsim test files skip/pass cleanly (239 passed, 9 skipped,
0 errors with bngsim genuinely uninstalled).
🎯 What: The testing gap addressed
The
name2uniprotfunction inbionetgen/atomizer/utils/pathwaycommons.pywas missing test coverage. Because it makes HTTP requests to UniProt to fetch IDs, it needed to be tested using mocked calls to ensure deterministic and safe testing.📊 Coverage: What scenarios are now tested
name2uniprotwith a valid organism correctly passes the parameter to UniProt and parses the response.name2uniprotwithout an organism makes the HTTP request correctly without the organism query parameter.✨ Result: The improvement in test coverage
The
name2uniprotfunction now has 100% path coverage for its active implementation. Since the development sandbox has complex import dependencies (likecementandsympy), the tests useimportliband scopedsys.modulespatching via a custom pytest fixture to ensure complete test isolation and zero global state pollution for the rest of the test suite.PR created automatically by Jules for task 15794140290505221084 started by @akutuva21