Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add query key population_type #229

Merged
merged 9 commits into from
Apr 12, 2024
Merged

Add query key population_type #229

merged 9 commits into from
Apr 12, 2024

Conversation

joni-herttuainen
Copy link
Contributor

Added a query key population_type to query edge / node ids based on population type.

Examples:

# Nodes
circuit.nodes.ids({"population_type": "biophysical"})
circuit.nodes.get({"population_type": ["astrocyte", "biophysical"]}, properties=["x", "y", "z"])

# Edges
circuit.nodes.ids({"population_type": "electrical"})
# NOTE: circuit.edges.get can't be queried the same way as circuit.nodes.get

Closes #228

@joni-herttuainen
Copy link
Contributor Author

joni-herttuainen commented Jul 17, 2023

# NOTE: circuit.edges.get can't be queried the same way as circuit.nodes.get

Actually, not quite true but we never claim that we'd support it:

circuit.edges.get({"population_type": "chemical"}) 
# returns: {"population_type": "chemical"} (dict)

circuit.edges.get({"population_type": "chemical", properties=["afferent_section_id"]})
# returns: pd.DataFrame with what you'd expect

Same happens with other queries used with Edges.get. Do we want to do something about this or leave it as is?

bluepysnap/query.py Outdated Show resolved Hide resolved
CHANGELOG.rst Outdated Show resolved Hide resolved
bluepysnap/query.py Show resolved Hide resolved
bluepysnap/query.py Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Jan 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (fb301e2) to head (a137e70).

❗ Current head a137e70 differs from pull request most recent head b6f5d3f. Consider uploading reports for the commit b6f5d3f to get more accurate results

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #229   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           33        32    -1     
  Lines         2743      2712   -31     
=========================================
- Hits          2743      2712   -31     
Flag Coverage Δ
pytest 100.00% <100.00%> (ø)

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

CHANGELOG.rst Outdated Show resolved Hide resolved
@mgeplf
Copy link
Contributor

mgeplf commented Feb 28, 2024

I think this is good to go, yeah? Seems reasonable to me, I think.

@joni-herttuainen joni-herttuainen requested review from GianlucaFicarelli and removed request for edasubert April 9, 2024 15:21
@joni-herttuainen joni-herttuainen merged commit dc2793c into master Apr 12, 2024
4 checks passed
@joni-herttuainen joni-herttuainen deleted the query_type branch April 12, 2024 10:19
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.

Filter by node or edge population type
4 participants