Do we want another level of lazy_loading in fre-cli so that tool groups don't need relative imports? As of now, an example that can demonstrate this is fre make and fre pp. Basically, this will also organize existing scripts into more specific subdirectories so that the subcommand scripts aren't just scattered around within a tool group's directory. Subdirectories for template files and tests can also be created.
With a structure like this, the imports within the tool files (i.e. fremake.py) would have to include relative imports for each subcommand like:
from .fremake_scripts.createCheckout import checkout_create
However, the tool group like make can itself become a lazy_group as well, with the capability to add its commands individually like in fre.py. However, this would take away the Click decorators in the file, and those would have to then be in the individual script files (this would mean that @click.pass_context won't need to be used, but scripts would need more rewriting).
Do we want another level of lazy_loading in fre-cli so that tool groups don't need relative imports? As of now, an example that can demonstrate this is
fre make
andfre pp
. Basically, this will also organize existing scripts into more specific subdirectories so that the subcommand scripts aren't just scattered around within a tool group's directory. Subdirectories for template files and tests can also be created.The current tree structure:
The envisioned tree structure:
With a structure like this, the imports within the tool files (i.e.
fremake.py
) would have to include relative imports for each subcommand like:from .fremake_scripts.createCheckout import checkout_create
However, the tool group like
make
can itself become a lazy_group as well, with the capability to add its commands individually like infre.py
. However, this would take away the Click decorators in the file, and those would have to then be in the individual script files (this would mean that@click.pass_context
won't need to be used, but scripts would need more rewriting).