In Short: Besides exporting code to a python module, what tools exist to get us closer to actual re-usable code: For instance, without the hard-coded inputs of the jupyter notebook.
More details: Faced with a new problem, a common pattern for myself and many data scientists around me is:
- Start developing with a jupyter notebook, and when the problem is solved...
- export to a .py file, and
- clean up and structure into a re-usable set of objects.
It seems like there should be tools to help out with that last steps. Theoretically, one should be able to analyze the AST, identify the functional components as well as the input and output "nodes" of these. That should be enough to get us closer to clean reusable code.
Note: To those that will want to say "that's a hard problem" I answer, in advance, with two numbers: 80/20. The fact that the 100% is difficult shouldn't deter us from creating solutions that bring us closer.