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

Feat 314 smartspim imaging #339

Merged
merged 10 commits into from
Feb 17, 2025
Merged

Feat 314 smartspim imaging #339

merged 10 commits into from
Feb 17, 2025

Conversation

mekhlakapoor
Copy link
Contributor

@mekhlakapoor mekhlakapoor commented Feb 5, 2025

closes #314

  • Adds endpoint slims/smartspim_imaging/{subject_id}

  • Adds model SpimImagingInformation to handle response

  • Adds "Bad Request" to ModelResponse

  • if latest and datetime are supplied, or if input datetime is not in correct iso format -> bad request error

  • if latest supplied, returns dictionary of latest imaging acquisition

  • if datetime supplied, returns acquisition with matching date performed (assumes input in UTC, SLIMS data in UTC)

  • if no matching date is found, or latest is not found, returns no data found error

@mekhlakapoor mekhlakapoor requested review from jtyoung84 and dyf February 5, 2025 23:56
@mekhlakapoor
Copy link
Contributor Author

mekhlakapoor commented Feb 7, 2025

  • OR latest from given datetime OR fetch all

UPDATE: going to use the regular endpoint to return full list, and then check datetime after

@jtyoung84
Copy link
Collaborator

Refactors imaging endpoint

  • Adds Generic TableHandler class to pull data from SLIMS. This can probably be moved to aind-slims-api in the future
    • Uses networkx DiGraph to keep track of the table relations
  • To Pull all data, user can hit /slims/smartspim_imaging
  • User can supply query parameters, subject_id, start_date_gte, and end_date_gte to filter response. start_date_gte and end_date_gte are the names that the airflow rest api uses. It expects the input to be valid ISO Format dates if defined.
  • Date filters by when the experiment_run was created, which is easier than results.date_performed.
  • If there is data, then it will be returned in a list with the most recent at the top

@jtyoung84 jtyoung84 merged commit 9528748 into dev Feb 17, 2025
2 checks passed
@jtyoung84 jtyoung84 deleted the feat-314-smartspim-imaging branch February 17, 2025 22:28
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.

Extract SPIM Imaging metadata from SLIMS
2 participants