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
Some of the issues to report with the current structure:
each of these commands requires specific tools and knowledge for the developer to find, understand and use them *
when using different tools it is difficult to have an overview on the available scripts (or at least the most useful ones) and where it is recommended to code to simplify some development tasks (e.g. versioning, virtualenv, ...) **
too much freedom for the final developers in writing output logs for bash scripts (eg. it's not always so easy to understand if and when a task is executed) ***
PyPA specs states that we can install scripts locally (python only? I didn't investigate in depth) when resolving project dependencies (e.g. while a pip install .).
This type of solution should be easily integrated with all the build tools present in the python world (e.g. poetry), but also directly via a regular python install using adding a pyproject.toml file to your project (here a sample pyproject on which you can experiment with adding a project script thus defined).
On the other hand:
a Makefile shouldn't need any further dependencies to work (to be updated and configured)
the make command is quite straightforward and is generally already available in many Linux installations
the make command does not need to create dedicated environments before starting a directive (ref. virtualenv for python projects)
NB all the considerations above are to be taken with the right caution, at the moment I have not investigated whether through the use of a python package manager (there are really too many) it could be simpler than a simple Makefile.
The text was updated successfully, but these errors were encountered:
Checklist
Motivation
As per v3.5,
these are some files that include development scripts that can be found in the source code bundle:
paver
/pavement.py
yarn / npm
/package.json
docker-compose
/ci_scripts/build_suite.sh
/ci_scripts/setup_suite.sh
/ci_scripts/run_env_development.sh
/run_docker_tests.sh
manage.py
/g3w-admin/base/management/commands/export_language_files.py
/g3w-admin/base/management/commands/import_language_files.py
/g3w-admin/base/management/commands/initadmin.py
/g3w-admin/base/management/commands/set_passwords.py
/g3w-admin/base/management/commands/update_modules.py
/g3w-admin/editing/management/commands/check_features_locked.py
/g3w-admin/editing/management/commands/migration_grant_to_atomic_permissions.py
/g3w-admin/usersmanage/management/commands/load_demo_dev_users_groups.py
Some of the issues to report with the current structure:
* ref: g3w-suite/g3w-suite-docker#75, #352, #419, #434
** ref: g3w-suite/g3w-client#112
*** ref: #373
Suggested solution
Use a Makefile in order to make writing administrative tasks independent of the tool and language needed to run it.
In particular we could start with:
pavement.py
tasks (which are already almost bash commands) into Makefile directivesbuild_suite.sh
andsetup_suite.sh
by calling Makefile directives within those filesREADME.md
#380) for people who don't want to use docker to developBelow a sample project from which we can get inspiration:
Alternatives considered
Python Project Scripts
ref: Python Project Scripts
PyPA specs states that we can install scripts locally (python only? I didn't investigate in depth) when resolving project dependencies (e.g. while a
pip install .
).This type of solution should be easily integrated with all the build tools present in the python world (e.g.
poetry
), but also directly via a regular python install using adding apyproject.toml
file to your project (here a sample pyproject on which you can experiment with adding a project script thus defined).On the other hand:
Makefile
shouldn't need any further dependencies to work (to be updated and configured)make
command is quite straightforward and is generally already available in many Linux installationsmake
command does not need to create dedicated environments before starting a directive (ref.virtualenv
for python projects)NB all the considerations above are to be taken with the right caution, at the moment I have not investigated whether through the use of a python package manager (there are really too many) it could be simpler than a simple
Makefile
.The text was updated successfully, but these errors were encountered: