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

Allow populate with secondary keys #1102

Open
CBroz1 opened this issue Sep 11, 2024 · 1 comment
Open

Allow populate with secondary keys #1102

CBroz1 opened this issue Sep 11, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@CBroz1
Copy link
Member

CBroz1 commented Sep 11, 2024

Currently, we use the passed attrs of populate as a restriction with the dj func _jobs_to_do

https://github.com/LorenFrankLab/spyglass/blob/master/src/spyglass/utils/dj_mixin.py#L597-L600

This relies on it being a valid restriction of key_source, which only includes primary keys. In a future enhancement, we would allow secondary keys of parents in this field. The need for primary keys is perhaps not transparent in documentation

@samuelbray32
Copy link
Collaborator

Just noting, datajoint's populate command also gets the list of jobs in the same way.

If selecting jobs by upstream secondary keys is a feature we want, we will also need to alter the restriction passed to super().populate() here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants