Skip to content

Selector contexts - #233

Merged
xelandernt merged 24 commits into
mainfrom
selector-contexts
Aug 6, 2026
Merged

Selector contexts#233
xelandernt merged 24 commits into
mainfrom
selector-contexts

Conversation

@xelandernt

@xelanderntxelandernt commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

Traverse and pin only the active Selector branch during injection context preparation.

Changes

  • Selector registers only its key provider and pins the active candidate with an injection-local context variable.
  • Injection now recursively prepares direct, string, and type-resolved provider graphs.
  • Added sync and async regressions for selected contexts, unselected async branches, nested selectors, and scope-less injection.

Checklist

  • Lint and format pass (ruff)
  • Tests pass and new behavior is covered
  • Build succeeds (uv build) if packaging or build config changed
  • Docs updated if behavior or public API changed
  • Repo metadata stays consistent across the three surfaces (GitHub description, pyproject description, profile blurb) if this touches packaging

@xelanderntxelandernt self-assigned this Jul 13, 2026
@xelanderntxelandernt added the enhancement New feature or request label Jul 13, 2026
@codecov

codecovBot commented Jul 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

FlagCoverage Δ
unittests100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing linesCoverage Δ
tests/providers/test_base.py100.00% <ø> (ø)
tests/providers/test_selector.py100.00% <100.00%> (ø)
tests/test_injection.py100.00% <100.00%> (ø)
that_depends/injection.py100.00% <100.00%> (ø)
that_depends/providers/__init__.py100.00% <100.00%> (ø)
that_depends/providers/base.py100.00% <ø> (ø)
that_depends/providers/context_resources.py100.00% <ø> (ø)
that_depends/providers/mixin.py100.00% <100.00%> (ø)
that_depends/providers/selector.py100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment threadthat_depends/injection.py
Comment threadthat_depends/injection.py Outdated
Comment threadthat_depends/injection.py Outdated
@xelandernt
xelandernt merged commit 4d3f4d3 into mainAug 6, 2026
12 checks passed
@xelandernt
xelandernt deleted the selector-contexts branch August 6, 2026 12:07
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancementNew feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@xelandernt