argoproj-labs / hera

Hera is an Argo Python SDK. Hera aims to make construction and submission of various Argo Project resources easy and accessible to everyone! Hera abstracts away low-level setup details while still maintaining a consistent vocabulary with Argo. ⭐️ Remember to star!
https://hera.rtfd.io
Apache License 2.0
550 stars 105 forks source link

Add SyntaxError for declaring outside of a Workflow context #1104

Closed elliotgunton closed 2 months ago

elliotgunton commented 2 months ago

Pull Request Checklist

Changes assert added previously into a full SyntaxError for better diagnostics for users. We could allow declaration of Steps/Tasks outside to then add later but it would overcomplicate the build process (to loop through the nodes and add the templates). Plus this error message should not be possible when users move to the new decorators syntax.