From Python scripts¶
The fractal-tasks-core
GitHub repository includes an examples folder, listing a few examples of how to run fractal-tasks-core
tasks from a standard Python script (instead of using the Fractal platform).
What follows is the content of examples/README.md:
Examples¶
This examples
folder offers a few examples of how to run fractal-tasks-core
tasks as part of a Python script.
Notes¶
- This folder is not always kept up-to-date. If you encounter any unexpected
problem, please open a new issue on the
fractal-tasks-core
GitHub repository. - Examples from 01 to 09 are currently aligned with fractal-tasks-core 0.10.0.
General instructions¶
The following instructions are valid for all examples; check the specific
README.md
files in each folder for more specific details.
-
Set up the correct environment via
(note: this can be done e.g. from a venv or from a conda environment).pip install fractal-tasks-core[fractal-tasks]
-
Download the example data from Zenodo, if necessary, via
pip install zenodo-get ./fetch_test_data_from_zenodo.sh
-
Enter one of the example folders, remove the
tmp_out
temporary output folder (if present), and run one of therun_workflow
Python scripts. -
View the output OME-Zarr in the
tmp_out
folder with napari, which can be installed viapip install napari[pyqt5] napari-ome-zarr
.