fractal-server 2.14.0a4__py3-none-any.whl → 2.14.0a5__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- __VERSION__ = "2.14.0a4"
1
+ __VERSION__ = "2.14.0a5"
@@ -270,30 +270,39 @@ async def get_history_images(
270
270
  # FIXME reduce logging?
271
271
  prefix = f"[DS{dataset.id}-WFT{wftask.id}-images]"
272
272
 
273
- # Reconstruct type filters by going through the workflow task list
274
- latest_type_filters = {}
275
- for current_wftask in workflow.task_list[0 : wftask.order + 1]:
276
- patch = merge_type_filters(
277
- wftask_type_filters=current_wftask.type_filters,
278
- task_input_types=current_wftask.task.input_types,
279
- )
280
- latest_type_filters.update(patch)
281
- logger.debug(f"{prefix} {latest_type_filters=}")
282
-
283
- # Get all matching images from the dataset
273
+ # (1) Get the type-filtered list of dataset images
274
+
275
+ # (1A) Reconstruct dataset type filters by starting from {} and making
276
+ # incremental updates with `output_types` of all previous tasks
277
+ inferred_dataset_type_filters = {}
278
+ for current_wftask in workflow.task_list[0 : wftask.order]:
279
+ inferred_dataset_type_filters.update(current_wftask.task.output_types)
280
+ logger.debug(f"{prefix} {inferred_dataset_type_filters=}")
281
+ # (1B) Compute type filters for the current wftask
282
+ type_filters_patch = merge_type_filters(
283
+ task_input_types=wftask.task.input_types,
284
+ wftask_type_filters=wftask.type_filters,
285
+ )
286
+ logger.debug(f"{prefix} {type_filters_patch=}")
287
+ # (1C) Combine dataset type filters (lower priority) and current-wftask
288
+ # filters (higher priority)
289
+ actual_filters = inferred_dataset_type_filters
290
+ actual_filters.update(type_filters_patch)
291
+ logger.debug(f"{prefix} {actual_filters=}")
292
+ # (1D) Get all matching images from the dataset
284
293
  filtered_dataset_images = filter_image_list(
285
294
  images=dataset.images,
286
- type_filters=latest_type_filters,
295
+ type_filters=inferred_dataset_type_filters,
287
296
  )
288
297
  logger.debug(f"{prefix} {len(dataset.images)=}")
289
298
  logger.debug(f"{prefix} {len(filtered_dataset_images)=}")
290
-
299
+ # (1E) Extract the list of URLs for filtered images
291
300
  filtered_dataset_images_url = list(
292
301
  img["zarr_url"] for img in filtered_dataset_images
293
302
  )
294
- logger.debug(f"{prefix} {len(filtered_dataset_images_url)=}")
295
303
 
296
- # Get pairs (zarr_url,status) for all processed images
304
+ # (2) Get `(zarr_url, status)` pairs for all images that have already
305
+ # been processed
297
306
  res = await db.execute(
298
307
  select(HistoryImageCache.zarr_url, HistoryUnit.status)
299
308
  .join(HistoryUnit)
@@ -306,8 +315,7 @@ async def get_history_images(
306
315
  list_processed_url_status = res.all()
307
316
  logger.debug(f"{prefix} {len(list_processed_url_status)=}")
308
317
 
309
- # Further processing
310
-
318
+ # (3) Combine outputs from 1 and 2
311
319
  list_processed_url = list(item[0] for item in list_processed_url_status)
312
320
  logger.debug(f"{prefix} {len(list_processed_url)=}")
313
321
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: fractal-server
3
- Version: 2.14.0a4
3
+ Version: 2.14.0a5
4
4
  Summary: Backend component of the Fractal analytics platform
5
5
  Home-page: https://github.com/fractal-analytics-platform/fractal-server
6
6
  License: BSD-3-Clause
@@ -1,4 +1,4 @@
1
- fractal_server/__init__.py,sha256=7tAxXkNvimqYIX0U_oeIYOmpP_2NjEN3fI6It2ac4-s,25
1
+ fractal_server/__init__.py,sha256=sgDDrxOsUDy3zySCXrYF7VhRC9RtP4pGuCH4ssm1pn0,25
2
2
  fractal_server/__main__.py,sha256=rkM8xjY1KeS3l63irB8yCrlVobR-73uDapC4wvrIlxI,6957
3
3
  fractal_server/alembic.ini,sha256=MWwi7GzjzawI9cCAK1LW7NxIBQDUqD12-ptJoq5JpP0,3153
4
4
  fractal_server/app/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -38,7 +38,7 @@ fractal_server/app/routes/api/v2/_aux_functions_history.py,sha256=dGr9mhuE1kJPx8
38
38
  fractal_server/app/routes/api/v2/_aux_functions_task_lifecycle.py,sha256=qdXCb6IP8-qPEAxGZKljtjIqNzIAyRaAsQSRi5VqFHM,6773
39
39
  fractal_server/app/routes/api/v2/_aux_functions_tasks.py,sha256=uhNSs-jcS7ndIUFKiOC1yrDiViw3uvKEXi9UL04BMks,11642
40
40
  fractal_server/app/routes/api/v2/dataset.py,sha256=osoWJIA5SZH4aAr-0TG6Uc3877wzsgCLB_Oek59hRjk,9230
41
- fractal_server/app/routes/api/v2/history.py,sha256=GPok8bYnagGPjNmoHvdLm2h-lirsd2ROUlMt2OjIoKM,12911
41
+ fractal_server/app/routes/api/v2/history.py,sha256=UInNe9u22GYmh4rCYQe_LrVBGNOFNCbETVgdmZsHKRw,13485
42
42
  fractal_server/app/routes/api/v2/images.py,sha256=wUhYomNLGtJTtu_pD2oQorcH2LISxo64Wxo6ogc4IXc,8185
43
43
  fractal_server/app/routes/api/v2/job.py,sha256=m89FTh9Px25oXCeWj2k2NdGWQaO2oxMh-6lZppcsJOY,5551
44
44
  fractal_server/app/routes/api/v2/project.py,sha256=hMvL9QLPUcAAiPGy6ta2LBLTVRozJsfvBPl5D06_MHg,6666
@@ -205,8 +205,8 @@ fractal_server/tasks/v2/utils_templates.py,sha256=Kc_nSzdlV6KIsO0CQSPs1w70zLyENP
205
205
  fractal_server/urls.py,sha256=QjIKAC1a46bCdiPMu3AlpgFbcv6a4l3ABcd5xz190Og,471
206
206
  fractal_server/utils.py,sha256=PMwrxWFxRTQRl1b9h-NRIbFGPKqpH_hXnkAT3NfZdpY,3571
207
207
  fractal_server/zip_tools.py,sha256=GjDgo_sf6V_DDg6wWeBlZu5zypIxycn_l257p_YVKGc,4876
208
- fractal_server-2.14.0a4.dist-info/LICENSE,sha256=QKAharUuhxL58kSoLizKJeZE3mTCBnX6ucmz8W0lxlk,1576
209
- fractal_server-2.14.0a4.dist-info/METADATA,sha256=dnHmj3wrxhQa2uhKzb4A9tJ2sSWtvj6kPEiTSO26NBQ,4550
210
- fractal_server-2.14.0a4.dist-info/WHEEL,sha256=RaoafKOydTQ7I_I3JTrPCg6kUmTgtm4BornzOqyEfJ8,88
211
- fractal_server-2.14.0a4.dist-info/entry_points.txt,sha256=8tV2kynvFkjnhbtDnxAqImL6HMVKsopgGfew0DOp5UY,58
212
- fractal_server-2.14.0a4.dist-info/RECORD,,
208
+ fractal_server-2.14.0a5.dist-info/LICENSE,sha256=QKAharUuhxL58kSoLizKJeZE3mTCBnX6ucmz8W0lxlk,1576
209
+ fractal_server-2.14.0a5.dist-info/METADATA,sha256=djodNy0t50zMf_TwN0uyw2tcP4nNfxxOm0g0rUbykUM,4550
210
+ fractal_server-2.14.0a5.dist-info/WHEEL,sha256=RaoafKOydTQ7I_I3JTrPCg6kUmTgtm4BornzOqyEfJ8,88
211
+ fractal_server-2.14.0a5.dist-info/entry_points.txt,sha256=8tV2kynvFkjnhbtDnxAqImL6HMVKsopgGfew0DOp5UY,58
212
+ fractal_server-2.14.0a5.dist-info/RECORD,,