Skip to content

Support filtering circuits by target_simulator__in#652

Merged
pgetta merged 1 commit into
mainfrom
feat/circuit-target-simulator-in-filter
Jun 29, 2026
Merged

Support filtering circuits by target_simulator__in#652
pgetta merged 1 commit into
mainfrom
feat/circuit-target-simulator-in-filter

Conversation

@pgetta

@pgetta pgetta commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

What

Adds a target_simulator__in list filter to the Circuit API, so clients can filter circuits by multiple target simulators at once:

GET /circuit?target_simulator__in=NEURON&target_simulator__in=Brian2

This brings target_simulator to parity with the sibling enum fields scale and build_category, which already expose both single-value and __in filters. Ordering by target_simulator was added previously in #640.

Changes

  • app/filters/circuit.py — add target_simulator__in: list[TargetSimulator] | None to CircuitFilterMixin. The __in operator is handled automatically by CustomFilter / fastapi-filter, so no service/router/factory wiring is needed. Shared via the mixin, so both CircuitFilter and NestedCircuitFilter pick it up.
  • tests/test_circuit.py — add a target_simulator__in assertion to test_filtering.

@pgetta pgetta self-assigned this Jun 29, 2026
@pgetta pgetta requested a review from eleftherioszisis June 29, 2026 13:36
@codecov

codecov Bot commented Jun 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Flag Coverage Δ
pytest 97.75% <100.00%> (+<0.01%) ⬆️

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

Files with missing lines Coverage Δ
app/filters/circuit.py 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@pgetta

pgetta commented Jun 29, 2026

Copy link
Copy Markdown
Contributor Author

Thanks Gianluca!

@pgetta pgetta merged commit 15b491c into main Jun 29, 2026
2 checks passed
@pgetta pgetta deleted the feat/circuit-target-simulator-in-filter branch June 29, 2026 14:00
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.

2 participants