Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consistent task name in examples #775

Open
hjoliver opened this issue Nov 10, 2024 · 0 comments
Open

Consistent task name in examples #775

hjoliver opened this issue Nov 10, 2024 · 0 comments
Assignees
Milestone

Comments

@hjoliver
Copy link
Member

hjoliver commented Nov 10, 2024

We should be consistent, obviously. Let's agree on the strategy and do a quick pass through the documentation to clean it up.

IMO tasks in examples should be named as follows:

  • concrete names in examples that pretend to be real workflows with tasks that do specific things
    • e.g., tutorial examples; task names should reflect what the task does
  • generic names in graph snippets used to illustrate triggering and optional outputs etc.
    • it doesn't matter what the task does in these examples
    • generic names immediately indicate that, with no mental effort required from the user

Motivated by #772 (comment) - in addition to concrete and generic examples, we now have a bunch with both generic and concrete-but-not-what-the-task-does names in the same line:

one:fail? & two:fail? => run_if_both_fail

IMO run_if_both_fail is not a great task name because (a) if restates its own triggering condition rather than reflecting what the task does, which is both redundant and not how real tasks ever get named; (b) it doesn't matter what the task does in this example, so a generic name would be perfectly fine; and (c) consistency with the other names in the example.

As such, this might seem puzzling to some users and they might even wonder if the name has functional meaning. "Might" is sufficient to disqualify it because the alternative (generic name, with the usual discussion of the example below if needed) has zero potential for confusion.

Reductio ad absurdum: if we wanted to use this naming scheme we should be consistent, something like this 🤯 :

can_fail_one:fail? can_fail_two:fail? => run_if_both_fail
@hjoliver hjoliver added this to the pending milestone Nov 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant