Package: groupeffect
Groupeffect: reusable Django app for developersRequirementshttps://github.com/django/djangohttps://www.django-rest-framework.org/OverviewChain existing management commands in one cli command with theeffect -t mcommand.Create boilerplate Django REST framework apps for fast development from configuration files and script templates witheffect -c app -t start.Run multiple tasks with the same command in an array of tasks if you like. Write task classes instead of management commands for faster cli integrations.Custom configurations and templates can be implemented to create different boilerplate apps.The purpose is to create scripts and templates that can be controlled by management commands and the option to chain them together for a better workflow and development experience.The goal is to simplify complex processes or commands with automated task classes and allow them to trigger other processes with the djangocall_commandfunction.ContainsManagement Commandgroupeffect.management.commands.effectTask Classesgroupeffect.management.tasks.defaultPython script and Html templatesgroupeffect.templatesThis package is currently under development. Please don't be confused if something is wrong :)Quick startAdd "groupeffect" to your INSTALLED_APPS setting like this:INSTALLED_APPS = [  ...  groupeffect, ...]python manage.py effect -dpython manage.py effect -hTHEN if you like to add a generic apppython manage.py effect -c app -t start -n apiORgenerate a config file in BASE_DIR folder with:python manage.py effect -c create -t configTHENaddGROUPEFFECT_CONFIG_JSON_FILE_PATHto settings.pyTHENpython manage.py effect -c app -t startyou have to import your models toapi.models.pyand include theapi.urls.organizationin your global url.py file in order to migrate the models and access the rest endpoints.Params in settings.pyGROUPEFFECT_MANAGEMENT_TASKS: List of classes, in STRING dot notation ( see: import_lib )GROUPEFFECT_CONFIG_JSON_FILE_PATH: Json file path can have any content as long you do not use the default tasks from the package.Boilerplate Task: CreateAppTaskRun enhancedeffect -c app -t startcommand to generate a boilerplate app with models, serializers, views, urls and tests from a configuration file. The templates can be switched by theschemakey in the config file. You can switch the templates if other schemas are available or you can subclass thegroupeffect.management.tasks.default.CreateAppTaskand overwriteget_templatemethod for custom templates. Don't forget to add your task classes array to the settings.py file. You can also add your own configuration file. See the details below. Please let me know if something has to be explained better.Default config JSON fileYou can add a global configuration file to your project which will be available in the context of your task classes seegroupeffect.management.task.default.CreatAppTaskif you use this task class then you have to keep the structure of thedefault.jsonfile. But you can exclude the default task classes in your settings.py if you wish.A list with objects to add generic apps.../groupeffect/management/configuration/default.json :`[
    
    {

        "app": "api",
        "service":"organization",
        "model":"namespace",
        "structure": ["database","serializers", "views","urls", "tests"],
        "schema": "default"

    }

]`Each dictionary entry must have a different app name otherwise the "app exists" error will be raised. You can change this behavior by overwriting thehandle_configmethod of thegroupeffect.management.task.default.CreatAppTaskclass. Currently I believe it would be better to prevent folders and files from being overwritten by the command.Description:app:

    The django application name, default is api.

service:

    The name of the nested scripts under the structured folders.

model:

    The name of the django model class. It will be used to set the generic class names for the boilerplate templates and imports.

structure:

    The folder names for nested namespaces and boilerplate template variables.

schema:

    It is used for the folder name which contains the boilerplate templates.More DetailsCli CommandsThe cli commandpython manage.py effectis the minimum to run theCommandclass which is needed to run the task classes in an array. The available options are generic flags and can behave differently with different task classes. The task classes are responsible for the option input handling. The idea is that you can run multiple tasks with the same command if you want.debug log:current configuration available tasks and cli optionspython manage.py effect -dhelp: and usagepython manage.py effect -hcreate: config filein BASE_DIR folderpython manage.py effect -c create -t configin app folder 'api', provide app name with -n flagpython manage.py effect -c create -t config -n apiat certain path, provide pathpython manage.py effect -c create -t config -p /app/package/tests/testapp/apistart app with nested folders from config fileshortpython manage.py effect -c app -t startcustom from clipython manage.py effect -c app -t start --name api --model Namespace --service organization --schema defaultrun multiple commands withgroupeffect.management.tasks.default.DefaultTaskclasshelppython manage.py effect -t mpython manage.py effect -t m -c helplist commands by indexpython manage.py effect -t m -c listchain available management commands by name or indexpython manage.py effect -t m -c check -c makemigrations -c migrate -c collectstatic --noinputpython manage.py effect -t m -c 1 -c 2 -c 3 ... --noinput( you must know the index fromeffect -t m -c listcommand )TasksUse thegroupeffect.management.tasks.default.MetaTaskto write new tasks. You can add task classes to theGROUPEFFECT_MANAGEMENT_TASKSarray. They will be called by theeffectcommand and theconfigurationandoptionswill be passed to the__init__function as**context. You have to set the command and tasks functions in yourTaskClassto handel stuff. You will also find aConfiguratorand aCommandclass in themanagement.commands.effectscript. They will handle cli inputs, json file upload and task classes. Feel free to fit them to your needs. More details in cli commands.Example:settings.py:

`GROUPEFFECT_MANAGEMENT_TASKS = ['app.module.script.class_name_1', app.module.script.task_class_2]`

cli:

`python manage.py effect`

`python manage.py effect -c command_name_y -command command_name_x -t task_name_1 -task task_name_2`The command and task names will be loaded to the task class underself.tasksandself.commandsas list in theMetaTaskclass. You can subclass or overwrite the class to add custom processes depending on the cli inputs.Package code on Githubhttps://github.com/Groupeffect/groupeffect-pypi/tree/main/framework/pypi/app/packageDevelopment code on Githubhttps://github.com/Groupeffect/groupeffect-pypiPyPi packagehttps://pypi.org/project/groupeffect/Django packagehttps://djangopackages.org/packages/p/groupeffect/