Skip to content

Remove config calls from internal functions and expose only at interf…#31

Open
nicoloesch wants to merge 1 commit into
mainfrom
30-remove-config-reads
Open

Remove config calls from internal functions and expose only at interf…#31
nicoloesch wants to merge 1 commit into
mainfrom
30-remove-config-reads

Conversation

@nicoloesch

@nicoloesch nicoloesch commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Notes

Depends on omop-emb to pass: AustralianCancerDataNetwork/omop-emb#50. (The reason the typer fails).
Requires version bump in pyproject.toml to 2.0 for omop-emb.

Summary

OmopGraphConfig.get_config()/OmopEmbConfig.get_config() were being called deep inside graph-traversal functions and a dataclass field default instead of once at a caller-resolved boundary.

  • find_shortest_paths, find_shortest_paths_batch, find_standard_paths (graph/paths.py) revert max_depth/max_paths/max_concepts to literal defaults, removing OmopGraphConfig from this module entirely.
  • GroundingConstraints.max_depth (reasoning/grounding.py) was an unguarded default_factory reachable with zero exception handling from oaklib_interface/omop_implementation.py:314 (an external OAK adapter entry point). Same fix: literal default instead of a config read.
  • KnowledgeGraph.emb property (graph/kg.py) updated for the new omop-emb resolve_backend(backend_type, *, sqlite_path=...) signature, and its own config resolution pushed up to EmbeddingConfiguration construction rather than the property re-resolving on first access.

@nicoloesch nicoloesch added the breaking Incompatible API change. MAJOR: x+1.y.z label Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking Incompatible API change. MAJOR: x+1.y.z

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor: move config reads out of dataclasses and algorithmic functions

1 participant