Skip to content

pelkmanslab/abbott

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

abbott

3D Multiplexed Image Analysis Workflows

Development instructions

This instructions are only relevant after you completed both the copier copy command and the git/GitLab/GitHub initialization phase - see README for details.

  1. It is recommended to work from an isolated Python virtual environment:
# Create the virtual environment in the folder venv
python -m venv venv
# Activate the Python virtual environment
source venv/bin/activate
# Deactivate the virtual environment, when you don't need it any more
deactivate
  1. You can install your package locally as in:
# Install only abbott:
python -m pip install -e .
# Install both abbott and development dependencies (e.g. pytest):
python -m pip install -e ".[dev]"
  1. Enjoy developing the package.

  2. The template already includes a sample task ("Thresholding Task"). Whenever you change its input parameters or docstring, re-run

python src/abbott/dev/create_manifest.py
git add src/abbott/__FRACTAL_MANIFEST__.json
git commit -m'Update `__FRACTAL_MANIFEST__.json`'
git push origin main
  1. If you add a new task, you should also add a new item to the TASK_LIST list, in src/abbott/dev/task_list.py. Here is an example:
from fractal_tasks_core.dev.task_models import NonParallelTask
from fractal_tasks_core.dev.task_models import ParallelTask
from fractal_tasks_core.dev.task_models import CompoundTask


TASK_LIST = [
    NonParallelTask(
        name="My non-parallel task",
        executable="my_non_parallel_task.py",
        meta={"cpus_per_task": 1, "mem": 4000},
    ),
    ParallelTask(
        name="My parallel task",
        executable="my_parallel_task.py",
        meta={"cpus_per_task": 1, "mem": 4000},
    ),
    CompoundTask(
        name="My compound task",
        executable_init="my_task_init.py",
        executable="my_actual_task.py",
        meta_init={"cpus_per_task": 1, "mem": 4000},
        meta={"cpus_per_task": 2, "mem": 12000},
    ),
]

Notes:

  • After adding a task, you should also update the manifest (see point 4 above).
  • The minimal example above also includes the meta and/or meta_init task properties; these are optional, and you can remove them if not needed.
  • More details on Fractal tasks will be soon available at https://fractal-analytics-platform.github.io.
  1. Run the test suite (with somewhat verbose logging) through
python -m pytest --log-cli-level info -s
  1. Build the package through
python -m build

This command will create the release distribution files in the dist folder. The wheel one (ending with .whl) is the one you can use to collect your tasks within Fractal.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages