Hi everyone! My name is Jon and I’m a Bioinformati...
# introductions
j
Hi everyone! My name is Jon and I’m a Bioinformatics Scientist in CA. Most of the pipelines I write are with Snakemake but thought I would write some in Prefect. As an introductory question, does anybody have an ETL pipeline example that take an OOP approach? most of the tutorials I’ve seen take a procedural approach. Thanks!
👋 9
k
Hi! This is something that previously was quite hard to do with prefect, but (and @Nate should be able to confirm this) it is possible now. That's probably why there isn't content out there about it.
n
you can indeed decorate instance, static and class methods if you find it necessary and it will work that said, one reason there's likely not much content on it is bc we typically recommend against OOP patterns within "prefect-specific" usage unless forced to adhere to some existing constraints that necessitate it because pure functions square better with prefect's runtime philosophy (dynamic graph of function calls) and OOP often creates more complexity than necessary. that's not to say you shouldn't use OOP code within or around your workflows or that you can't ignore my recommendation and have things work out great 🙂 im just giving context on the lack of OOP-forward examples
j
Thank you @Kevin Grismore and @Nate ! This makes sense. I’ll start with pure functions then migrate to an OOP design if need be. Thanks 🙂
catjam 1
🙌 1