ytree-project / ytree

A yt-based merger-tree code.
Other
15 stars 10 forks source link

Fix analysis pipeline operation filtering and add always_do option. #129

Closed brittonsmith closed 2 years ago

brittonsmith commented 2 years ago

PR Summary

Instead of trying to specifically detect boolean return values from analysis pipeline operations, we now interpret any non-None return value as a boolean for filtering. This avoids increasingly complex checks to correctly detecting all boolean-like values. This also adds an always_do option to add_operation, which allows an operation to be run regardless of prior filters. This can be useful for adding cleanup functions at the ends of pipelines.

PR Checklist