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
from .main import *
from .sub_package.train import *
--
Problem:
We have over-complicated rules of naming (only dashes allowed for slug, only underscores allowed for code dir. At the same time, we don't allow users to address Python code as from a local package. Instead, we use hacks as -e PYTHONPATH=<project-dir> or sys.path.append('<project-dir>').
Pros of using the hacks: code directory name can be fixed to src to simplify the template considerably
Cons of using the hacks: to develop locally, i.e. to set up your local IDE, you'd need to use the same hacks, different across IDEs. Plus, hard to understand as it's not a stnadard way.
In turn, we should use a standard way of forming a Python package via setup.py. Note, in this case code dir still can be named with dashes.
The text was updated successfully, but these errors were encountered:
TL;DR
Let's modify template so that relative imports work:
--
Problem:
We have over-complicated rules of naming (only dashes allowed for slug, only underscores allowed for code dir. At the same time, we don't allow users to address Python code as from a local package. Instead, we use hacks as
-e PYTHONPATH=<project-dir>
orsys.path.append('<project-dir>')
.src
to simplify the template considerablyIn turn, we should use a standard way of forming a Python package via
setup.py
. Note, in this case code dir still can be named with dashes.The text was updated successfully, but these errors were encountered: