Replace live biolink fetch in tests with local fixture#168
Merged
amc-corey-cox merged 3 commits intomainfrom Mar 27, 2026
Merged
Replace live biolink fetch in tests with local fixture#168amc-corey-cox merged 3 commits intomainfrom
amc-corey-cox merged 3 commits intomainfrom
Conversation
Fixes flaky CI failures from HTTP 429 rate limiting by loading the vendored biolink-model.yaml instead of fetching from GitHub on every test run. Also fixes broken BIOLINK_SRC_SCHEMA path and a bad import. Closes #167 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes a flaky network dependency from the Biolink subsetting tests by switching them to use the already-vendored Biolink schema fixture, and it corrects related test constants/imports to match the repository’s package layout.
Changes:
- Updated Biolink subsetting tests to load
biolink-model.yamlfrom the local vendored fixture instead of fetching from GitHub. - Fixed
BIOLINK_SRC_SCHEMAto point atbiolink-model.yaml(previously referenced a non-existentbiolink.yaml). - Corrected the
load_specificationimport path and cleaned up thetmp_pathtype annotation.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/test_transformer/test_biolink_subsetting.py | Replaces live HTTP schema fetch with local fixture and cleans up imports/type annotations. |
| tests/init.py | Fixes Biolink schema fixture constant to match the vendored filename. |
Replace print-only smoke tests with real assertions on derived classes, slots, and types. Remove unused BIOLINK_TGT_SCHEMA and BIOLINK_DATA constants from tests/__init__.py. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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
biolink-model.yamlwith the vendored local copy already intests/input/examples/biolink/source/, eliminating HTTP 429 flaky CI failuresBIOLINK_SRC_SCHEMAconstant (pointed to non-existentbiolink.yaml, now correctly points tobiolink-model.yaml)src.linkml_map.utils.loadersimport →linkml_map.utils.loaders; removed unusedGeneratorimport and incorrect type annotationCloses #167
Test plan
test_biolink_subsetting_manualandtest_biolink_subset_autopass (~1s, no network calls)🤖 Generated with Claude Code