Draft
Conversation
- New .github/workflows/test.yml with parallel unit-tests and integration-tests jobs; integration job uses a Redis service container on port 6379. - New docker-compose-redis.yml for running Redis locally during development. - New tests/test_integration.py with 27 tests across 6 classes (status, get_normalized_nodes, semantic_types, curie_prefixes, setid, query, conflations), all marked pytest.mark.integration; data-loading placeholder present for Phase 2. - Updated tests/conftest.py to add session-scoped integration_client fixture with Redis availability check and TestClient context manager. - Updated tests/test_callback.py to skip test_async_query_callback (requires external callback-app container). - Updated pytest.ini to register integration and callback_integration markers and document the plain-pytest limitation from test_norm/test_setid module-level app.state mutation. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
NodeLoader.__init__ and get_config now accept an optional config_file parameter (defaults to the project-root config.json, preserving existing behavior). This removes the need for monkeypatching in tests and lets the integration test fixture and CI loading step pass tests/data/config.json directly. Also adds tests/data/config.json pointing at the Gene/Protein compendia and GeneProtein conflation under tests/data/, and wires it into the integration_client fixture and the GitHub Actions loading step. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
bmt.utils.format_element was renamed to bmt.util.format in the installed version (bmt==1.4.3); update the import in loader.py and normalizer.py. Integration tests are marked xfail because bmt-lite raises ValueError when Toolkit() is called with a schema URL in startup_event (server.py:75). Add tests/README.md documenting this and the unawaited-coroutine issue in test_loader.py::test_nn_load. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
I just don't like 'em.
bmt-lite-v3.1.0 was overwriting bmt/__init__.py in the shared namespace, causing Toolkit(url) to raise ValueError. Fix: uninstall bmt-lite and reinstall bmt cleanly. This also lets us revert the bmt.utils->bmt.util rename (format_element is back), and remove the xfail marker from all integration tests. Also fix test_unknown_semantic_type: the endpoint returns a "Not found" sentinel for unknown types rather than an empty dict; update the assertion to match the real behavior. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
aioredis 2.x defines TimeoutError(asyncio.TimeoutError, builtins.TimeoutError) which raises TypeError on Python 3.11+ where the two are the same type. The codebase uses the aioredis 1.x API (create_redis_pool, aioredis.commands.Redis) so 2.x would also break at runtime. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Without pins, CI installs pydantic v2 + matching newer fastapi/reasoner-pydantic. The codebase uses pydantic v1 APIs (class-based Config, min_items, etc.) and reasoner-pydantic 4.x, which are incompatible with pydantic v2. fastapi 0.100+ dropped pydantic v1 support. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
fastapi<0.100 was too broad: fastapi 0.99.x pulls in starlette 0.27+ which uses httpx as the TestClient backend. A newer httpx then dropped the app= kwarg, breaking TestClient(app) in all tests. fastapi==0.83.0 pins starlette==0.19.1 (requests-based TestClient), which is the version the test suite was written against. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
starlette 0.19.1 TestClient calls anyio.start_blocking_portal(), which was removed in anyio 4.x. CI was getting anyio 4.12.1 while the locally working version is 3.7.1. Co-Authored-By: Claude Sonnet 4.6 <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.
WIP