fractal-analytics-platform / fractal-server

Fractal backend
https://fractal-analytics-platform.github.io/fractal-server/
BSD 3-Clause "New" or "Revised" License
9 stars 3 forks source link

Add test for non-python task #189

Closed tcompa closed 1 year ago

tcompa commented 1 year ago
jluethi commented 1 year ago

This will be very nice. E.g. if we'd want to integrate with the Java-based OME-NGFF converter from Glencoe to allow parsing of OME-compatible files to OME-Zarr (they just recently released their converter. I haven't tested it yet, but it may be a nice way to get access to more OME-Zarr parsing for diverse microscopes, though certainly wouldn't handle ROIs yet and probably not save things as individual images per well): https://github.com/glencoesoftware/NGFF-Converter Also, it has a GPL 2.0 license, so we can't directly depend on it from our BSD3 license repo.

But in general, integration with such tools should become easier with the support for arbitrary executables.

tcompa commented 1 year ago

How to proceed in practice:

NOTE: all of this should first be tested with the local backend only, not with slurm,docker,etc..

More in detail: do not use the collect_tasks fixture, and replace

        # Add a dummy task
        res = await client.post(
            f"{PREFIX}/workflow/{workflow_id}/add-task/",
            json=dict(task_id=collect_packages[0].id),
        )

with something like

        # Create a new task
        ....
        # Add a task
        res = await client.post(
            f"{PREFIX}/workflow/{workflow_id}/add-task/",
            json=dict(task_id=new_task.id),
        )