Skip to content

Replace live biolink fetch in tests with local fixture#168

Merged
amc-corey-cox merged 3 commits intomainfrom
fix-biolink-tests
Mar 27, 2026
Merged

Replace live biolink fetch in tests with local fixture#168
amc-corey-cox merged 3 commits intomainfrom
fix-biolink-tests

Conversation

@amc-corey-cox
Copy link
Copy Markdown
Contributor

Summary

  • Replaced live GitHub fetch of biolink-model.yaml with the vendored local copy already in tests/input/examples/biolink/source/, eliminating HTTP 429 flaky CI failures
  • Fixed BIOLINK_SRC_SCHEMA constant (pointed to non-existent biolink.yaml, now correctly points to biolink-model.yaml)
  • Fixed src.linkml_map.utils.loaders import → linkml_map.utils.loaders; removed unused Generator import and incorrect type annotation

Closes #167

Test plan

  • Both test_biolink_subsetting_manual and test_biolink_subset_auto pass (~1s, no network calls)
  • Ruff check and format clean

🤖 Generated with Claude Code

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>
@amc-corey-cox amc-corey-cox requested a review from Copilot March 27, 2026 14:28
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.yaml from the local vendored fixture instead of fetching from GitHub.
  • Fixed BIOLINK_SRC_SCHEMA to point at biolink-model.yaml (previously referenced a non-existent biolink.yaml).
  • Corrected the load_specification import path and cleaned up the tmp_path type 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>
@amc-corey-cox amc-corey-cox merged commit bf5569e into main Mar 27, 2026
7 checks passed
@amc-corey-cox amc-corey-cox deleted the fix-biolink-tests branch March 27, 2026 15:21
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.

Replace live biolink fetch in tests with local fixture

2 participants