Skip to content

feat: add cell name search to GET /api/cell/ endpoint#685

Merged
aleclevy merged 1 commit intojlab-sensing:mainfrom
aabhinavvvvvvv:fix/issue-527-cell-search-endpoint
Mar 9, 2026
Merged

feat: add cell name search to GET /api/cell/ endpoint#685
aleclevy merged 1 commit intojlab-sensing:mainfrom
aabhinavvvvvvv:fix/issue-527-cell-search-endpoint

Conversation

@aabhinavvvvvvv
Copy link
Copy Markdown
Contributor

Fixes #527

Summary

Adds case-insensitive substring search for cells by name via the existing GET /api/cell/ endpoint.

Changes

  • Cell.search_by_name(pattern) — new static method on the Cell model using SQLAlchemy ilike for case-insensitive matching (same pattern as Tag.search_by_name)
  • GET /api/cell/?name=<query> — when name param is provided, returns cells whose names contain the given string (case-insensitive)
  • Test — added test_cell_search_by_name covering full match, partial match, and no match cases

Usage

GET /api/cell/?name=station

@aleclevy aleclevy merged commit 7d55116 into jlab-sensing:main Mar 9, 2026
1 of 2 checks passed
@aleclevy
Copy link
Copy Markdown
Contributor

aleclevy commented Mar 9, 2026

@aabhinavvvvvvv I believe the test you made hangs indefinitely. Please test it and verify that it works as intended

@aabhinavvvvvvv
Copy link
Copy Markdown
Contributor Author

@aabhinavvvvvvv I believe the test you made hangs indefinitely. Please test it and verify that it works as intended

Actually the test was using two different fixtures (setup_cells and init_database) in the same module that caused PostgreSQL lock conflict that hung indefinitely. I have fixed it here #695

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.

Api endpoint to search for cell names

2 participants