@@ -96,7 +96,7 @@ def _jobs_to_do(self, restrictions):
96
96
97
97
def populate (self , * restrictions , suppress_errors = False , return_exception_objects = False ,
98
98
reserve_jobs = False , order = "original" , limit = None , max_calls = None ,
99
- display_progress = False ):
99
+ display_progress = False , ** kwargs ):
100
100
"""
101
101
rel.populate() calls rel.make(key) for every primary key in self.key_source
102
102
for which there is not already a tuple in rel.
@@ -108,6 +108,7 @@ def populate(self, *restrictions, suppress_errors=False, return_exception_object
108
108
:param display_progress: if True, report progress_bar
109
109
:param limit: if not None, checks at most that many keys
110
110
:param max_calls: if not None, populates at max that many keys
111
+ :param kwargs: additional custom keyword arguments that will be passed down to each make() call
111
112
"""
112
113
if self .connection .in_transaction :
113
114
raise DataJointError ('Populate cannot be called during a transaction.' )
@@ -150,7 +151,10 @@ def handler(signum, frame):
150
151
call_count += 1
151
152
self .__class__ ._allow_insert = True
152
153
try :
153
- make (dict (key ))
154
+ if kwargs :
155
+ make (dict (key ), ** kwargs )
156
+ else :
157
+ make (dict (key ))
154
158
except (KeyboardInterrupt , SystemExit , Exception ) as error :
155
159
try :
156
160
self .connection .cancel_transaction ()
0 commit comments