Skip to content

Potential to add something as return for CP Parallel function #4

Open

Description

@jenna-tomkinson

Consider returning something from this function - perhaps the logs or something which could be useful downstream. Doing this will help to chain together functionality here or where the function is implemented.

Originally posted by @d33bs in #1 (comment)

Activity

  1. d33bs commented on Aug 30, 2024

    @d33bs
    Member

    This is often a common practice for functional programming styles. Generally functions which return something are easier to test (we can test the output) whereas imperative functions (ones which do not return anything) must be sometimes implicitly tested. Functions which return values are also generally easier to compose together with one another, encouraging reuse and growth patterns. In addition, functions which return values generally are easier to think through as they tell us about modified states of variables or other data (instead of modifying state implicitly leaving us to guess about what happened).

    For the existing functions which leverage subprocess we're already dealing with a bit of implied state (relying on the Python sub-process to tell us about what happened to the CellProfiler run - which itself only provides logs and no direct control through the API). I'd suggest limiting further implied states where we can and adding useful output so the work may better grow over time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions