1
$\begingroup$

I am trying to settle on an efficient & pythonic workflow for developing scripts in data science work that are scalable and don't turn to spaghetti once things get complicated and parameters are changed. Until now, I've been using header comments, but it seems like splitting things into multiple files keeps things the cleanest.

However, I haven't been able to figure out how to import functions/variables from within the script directory because it is not a package. I do not think I want to make every little script I write into a package, so what I can I do to get around this? The best I've found is from this thread:

from . config import * -> ImportError: attempted relative import with no known parent package

Alternatively, does anyone have experience with this issue or resources on structure? I've been loosely using Cookie Cutter Data Science, but I'm reaching the point where every item in the "features" folder (for example) needs its own file for data assimilation/processing/QC visualization.

$\endgroup$
1
  • $\begingroup$ I’m voting to close this question because of both the reasons listed above. The OP would be better served by asking him to redirect to the code review stackexchange or something similar. $\endgroup$ – Raghuram Feb 6 at 8:49