You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TL;DR: We need to provide users a means to distinguish cell types and chain/order cells before well-defined exporting from Codepod to .py scripts or Jupyter notebook.
In a CodePod project, code cells do not have orders. So when exporting them to conventional files or Jupyter notebooks, determining the order is a problem.
If a CodePod project has only function/class definitions, then it is very easy because order does not matter. Just export them into one big file or, if there are scopes, to different folders and files. Since scopes are hierarchical, the tree structure of folders and files is enough.
But things become tricky when there are variable definitions, statements, and expressions -- order matters to them. Let's call them "discrete elements" and the function/class definitions as "ICs".
Some discrete elements, like testing code, should NOT be executed when a scope is called. They are like code under if __name__=="__main__". So we need to give users a way to label such code cells and then either discard them or put them under if __name__=="__main__".
The hard part is the rest of them. Order matters. Not only between discrete elements, but also between discrete elements and ICs. Unless we provide a way for users to specify their execution order, the data dependency may be messed up and the code may become non-executable.
So, how to specify the order? I think we can allow uses to label an order number with in the scope. Chain cells using arrows is also good idea. But i am afraid they will look too messy. I think we should implement both.
The text was updated successfully, but these errors were encountered:
TL;DR: We need to provide users a means to distinguish cell types and chain/order cells before well-defined exporting from Codepod to
.py
scripts or Jupyter notebook.In a CodePod project, code cells do not have orders. So when exporting them to conventional files or Jupyter notebooks, determining the order is a problem.
If a CodePod project has only function/class definitions, then it is very easy because order does not matter. Just export them into one big file or, if there are scopes, to different folders and files. Since scopes are hierarchical, the tree structure of folders and files is enough.
But things become tricky when there are variable definitions, statements, and expressions -- order matters to them. Let's call them "discrete elements" and the function/class definitions as "ICs".
if __name__=="__main__"
. So we need to give users a way to label such code cells and then either discard them or put them underif __name__=="__main__"
.So, how to specify the order? I think we can allow uses to label an order number with in the scope. Chain cells using arrows is also good idea. But i am afraid they will look too messy. I think we should implement both.
The text was updated successfully, but these errors were encountered: