Skip to content

feat: get_record_by_name and get_projection_by_name helpers#211

Merged
helen-m-lin merged 1 commit intodevfrom
feat-210-get-record-by-name
Apr 21, 2026
Merged

feat: get_record_by_name and get_projection_by_name helpers#211
helen-m-lin merged 1 commit intodevfrom
feat-210-get-record-by-name

Conversation

@helen-m-lin
Copy link
Copy Markdown
Contributor

closes #210

This PR adds get_record_by_name and get_projection_by_name helper methods following the format of the existing "get by id" helpers.

Copy link
Copy Markdown
Contributor

@jtyoung84 jtyoung84 left a comment

Choose a reason for hiding this comment

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

Can these be made class methods on the client instead of adding them to the helpers class? Also, it seems like they can be combined into one function by making the projection an optional dict with default None.

@helen-m-lin
Copy link
Copy Markdown
Contributor Author

I followed the format of the existing get_record_by_id and get_projection_by_id methods. Should I update those as well? These would be breaking changes.

@tmchartrand
Copy link
Copy Markdown
Member

I like the idea of combining with an optional arg, and don't expect breaking changes will be a big issue here.

@jtyoung84 are you suggesting moving everything in this helpers.docdb module to client class methods? I don't have a strong preference either way but it would be a bit odd to move some and not all.

@tmchartrand
Copy link
Copy Markdown
Member

I guess one reason not to would be if we were open to eventually adding the option of returning validated Pydantic objects as I suggested in the issue - then I assume we'd want to keep the aind-data-schema dependency isolated to the helpers module.

Copy link
Copy Markdown
Contributor

@jtyoung84 jtyoung84 left a comment

Choose a reason for hiding this comment

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

I reckon we can leave this as is. We can refactor things in the next major release.

@helen-m-lin helen-m-lin merged commit fcf2d8b into dev Apr 21, 2026
3 checks passed
@helen-m-lin helen-m-lin deleted the feat-210-get-record-by-name branch April 21, 2026 22:50
helen-m-lin added a commit that referenced this pull request Apr 21, 2026
* feat: get_record_by_name and get_projection_by_name helpers (#211)

* ci: bump version to 1.10.0
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.

add get_record_by_name to helpers

3 participants