Skip to content

Conversation

bilalesi
Copy link
Contributor

No description provided.

@bilalesi bilalesi force-pushed the feat/sims-filter-by-circuit branch from 9773916 to 17a6c0b Compare July 25, 2025 19:09
@bilalesi bilalesi marked this pull request as ready for review July 28, 2025 08:47
@bilalesi bilalesi self-assigned this Jul 28, 2025
@@ -18,6 +19,7 @@
class SimulationFilterBase(NameFilterMixin, IdFilterMixin, CustomFilter):
entity_id: uuid.UUID | None = None
entity_id__in: list[uuid.UUID] | None = None
circuit: Annotated[NestedCircuitFilter | None, NestedCircuitFilterDep] = None
Copy link
Contributor

Choose a reason for hiding this comment

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

Although I am ok with this workaround, I am afraid that someone will decide to set a different entity in entity_id breaking this endpoint. On the other hand we control what is added in Simulation's entity_id, so we just need to be careful. However, people forget..

@GianlucaFicarelli wdyt?

Copy link
Collaborator

Choose a reason for hiding this comment

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

We can modify the filter when we'll allow different types of entities, but do we already know which ones to expect? Not sure how easy is to use a sort of polymorphism here, or if we need different filters.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

IDK, probably other simulations (single neuron, synaptome) will be using the same logic in the future

@bilalesi bilalesi force-pushed the feat/sims-filter-by-circuit branch from 17a6c0b to 6a8c1e2 Compare July 28, 2025 12:06
@eleftherioszisis
Copy link
Contributor

eleftherioszisis commented Jul 29, 2025

Can you please add.a test that covers this use case? Just to make sure we don't break it unintentionally in the future.

@bilalesi
Copy link
Contributor Author

Can you please add.a test that covers this use case? Just to make sure we don't break it unintentionally in the future.

forget to push them, test added

@bilalesi
Copy link
Contributor Author

@GianlucaFicarelli is this okey to be merged ?

@bilalesi bilalesi force-pushed the feat/sims-filter-by-circuit branch from dc882b2 to a386697 Compare July 31, 2025 07:27
@GianlucaFicarelli GianlucaFicarelli changed the title add filters for ciruit in simulation campaign add filters for circuit in simulation campaign Jul 31, 2025
@GianlucaFicarelli GianlucaFicarelli merged commit 5e083ac into main Jul 31, 2025
1 check passed
@GianlucaFicarelli GianlucaFicarelli deleted the feat/sims-filter-by-circuit branch July 31, 2025 09:39
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.

3 participants