GitHub user zyratlo added a comment to the discussion: Where should the helper functions go in an exported Python script?
I prefer option B. Maybe something like `texera_helpers.py` as the name is better instead. My only concern is the copy button. With B the modal still offers copy, but the copied script won't run without the zip, so someone pasting it into a notebook gets an ImportError and has to figure out why. Could copy give the self-contained version instead, so copy always runs and download gives you the cleaner two-file layout? Related to that, if the problem is that the workflow is hard to find, there's another option that keeps one file. Wrap the workflow code in a `main()` function at the top and put the helpers below it with `if __name__ == "__main__": main()` at the end. This way the workflow ends up at the top of the file and the script still runs on its own. That could be the copy version, and B stays the download, but then the copy and download give different formats which might not be ideal. GitHub link: https://github.com/apache/texera/discussions/9368#discussioncomment-19500011 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected]
