From 2732942633320b691eeee771ef46c9f6b10deb3f Mon Sep 17 00:00:00 2001 From: Mathieu Benoit Date: Tue, 17 Jan 2023 21:44:30 -0500 Subject: [PATCH 1/6] [UPD] script db_restore: better description help - show nothing when nothing to do --- script/database/db_restore.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/script/database/db_restore.py b/script/database/db_restore.py index 7d1fdf4..af3dce1 100755 --- a/script/database/db_restore.py +++ b/script/database/db_restore.py @@ -22,21 +22,25 @@ def get_config(): parser = argparse.ArgumentParser( formatter_class=argparse.RawDescriptionHelpFormatter, description="""\ - Restore database, use cache to clone to improve speed. +DESCRIPTION + Restore database, use cache to clone to improve speed. + +SUGGESTION + ./script/database/db_restore.py -d test """, epilog="""\ """, ) # parser.add_argument('-d', '--dir', dest="dir", default="./", # help="Path of repo to change remote, including submodule.") - parser.add_argument("--database", help="Database to manipulate.") + parser.add_argument("-d", "--database", help="Database to manipulate.") parser.add_argument( "--image", default="erplibre_base", help=( "Image name to restore, from directory image_db, filename without" " '.zip'. Example, use erplibre_base to use image" - " erplibre_base.zip." + " erplibre_base.zip. Default value is erplibre_base" ), ) parser.add_argument( @@ -134,6 +138,9 @@ def main(): out = check_output(arg.split(" ")).decode() print(out) + if not config.clean_cache and not config.database: + print("Nothing to do.") + if __name__ == "__main__": main() From 7c123685ef4cdaa2e6c512aa70a4cf00402571b9 Mon Sep 17 00:00:00 2001 From: Mathieu Benoit Date: Sat, 21 Jan 2023 00:50:21 -0500 Subject: [PATCH 2/6] [ADD] manifest: OCA_server-ux is now default base --- manifest/default.dev.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest/default.dev.xml b/manifest/default.dev.xml index 765680d..19471ec 100644 --- a/manifest/default.dev.xml +++ b/manifest/default.dev.xml @@ -148,7 +148,7 @@ - + From 5d478954f3cbac6498a33147e046c8dc3eb08a6a Mon Sep 17 00:00:00 2001 From: Mathieu Benoit Date: Sun, 22 Jan 2023 18:08:39 -0500 Subject: [PATCH 3/6] [ADD] script install_addons_dev: increase memory when use dev --- script/addons/install_addons_dev.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/script/addons/install_addons_dev.sh b/script/addons/install_addons_dev.sh index 9d6afc7..f42e7cd 100755 --- a/script/addons/install_addons_dev.sh +++ b/script/addons/install_addons_dev.sh @@ -14,9 +14,10 @@ fi echo "Install module '$2' on BD '$1'" if [[ $# -eq 3 ]]; then - ./run.sh --no-http --stop-after-init --dev cg -d "$1" -i "$2" -u "$2" -c "$3" + ./run.sh --no-http --stop-after-init --limit-memory-soft=8589934592 --limit-memory-hard=10737418240 --dev cg -d "$1" -i "$2" -u "$2" -c "$3" +# ./run.sh --no-http --stop-after-init fd --limit-memory-soft=2048*1024*1024 --dev cg -d "$1" -i "$2" -u "$2" -c "$3" else - ./run.sh --no-http --stop-after-init --dev cg -d "$1" -i "$2" -u "$2" + ./run.sh --no-http --stop-after-init --limit-memory-soft=8589934592 --limit-memory-hard=10737418240 --dev cg -d "$1" -i "$2" -u "$2" fi retVal=$? From 85a1ff04f176abfe0ecea17b0097a0ea9d041a4b Mon Sep 17 00:00:00 2001 From: Mathieu Benoit Date: Mon, 23 Jan 2023 23:25:47 -0500 Subject: [PATCH 4/6] [ADD] makefile: format mathbentech business --- Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index 79528dc..ec480b5 100644 --- a/Makefile +++ b/Makefile @@ -835,6 +835,9 @@ format_supported_addons: .venv/bin/isort --profile black -l 79 ./addons/MathBenTech_erplibre-family-management/ ./script/maintenance/black.sh ./addons/MathBenTech_erplibre-family-management/ #./script/maintenance/prettier_xml.sh ./addons/MathBenTech_erplibre-family-management/ + .venv/bin/isort --profile black -l 79 ./addons/MathBenTech_odoo-business-spending-management-quebec-canada/ + ./script/maintenance/black.sh ./addons/MathBenTech_odoo-business-spending-management-quebec-canada/ + #./script/maintenance/prettier_xml.sh ./addons/MathBenTech_erplibre-family-management/ .PHONY: format_code_generator_template format_code_generator_template: From 3208f8f4dc49c9e60277de431414edd5bb1818a6 Mon Sep 17 00:00:00 2001 From: Mathieu Benoit Date: Mon, 23 Jan 2023 23:26:01 -0500 Subject: [PATCH 5/6] =?UTF-8?q?[UPD]=C2=A0format=20script=20python?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script/ide/pycharm_configuration.py | 4 +++- script/test/run_parallel_test.py | 7 +++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/script/ide/pycharm_configuration.py b/script/ide/pycharm_configuration.py index e943162..0d197e7 100755 --- a/script/ide/pycharm_configuration.py +++ b/script/ide/pycharm_configuration.py @@ -324,7 +324,9 @@ def add_configuration(dct_xml, file_name, config): conf_full["@folderName"] = conf_folder lst_configuration_full.insert(0, conf_full) else: - _logger.info(f"Configuration already exist: '{s_unique_key}'") + _logger.info( + f"Configuration already exist: '{s_unique_key}'" + ) else: _logger.error(f"Cannot read file '{PATH_DEFAULT_CONFIGURATION}'") return has_change diff --git a/script/test/run_parallel_test.py b/script/test/run_parallel_test.py index dd8c093..a630f4d 100755 --- a/script/test/run_parallel_test.py +++ b/script/test/run_parallel_test.py @@ -692,13 +692,16 @@ def check_git_change(): run_command( "./script/code_generator/check_git_change_code_generator.sh", "./addons/TechnoLibre_odoo-code-generator-template", - test_name="Init check_git_change TechnoLibre_odoo-code-generator-template", + test_name=( + "Init check_git_change" + " TechnoLibre_odoo-code-generator-template" + ), ), run_command( "./script/code_generator/check_git_change_code_generator.sh", "./addons/OCA_server-tools", test_name="Init check_git_change OCA_server-tools", - ) + ), ] commands = asyncio.gather(*task_list) tpl_result = loop.run_until_complete(commands) From 0a2efd8a428e0aae31446a158149c0d07d9dd173 Mon Sep 17 00:00:00 2001 From: Mathieu Benoit Date: Thu, 26 Jan 2023 00:33:40 -0500 Subject: [PATCH 6/6] [UPD] script install_OSX_dependency.sh: start postgresql at installation --- script/install/install_OSX_dependency.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/script/install/install_OSX_dependency.sh b/script/install/install_OSX_dependency.sh index 0e194d8..df607c9 100755 --- a/script/install/install_OSX_dependency.sh +++ b/script/install/install_OSX_dependency.sh @@ -14,6 +14,7 @@ EL_USER=${USER} #-------------------------------------------------- echo "\n---- Install PostgreSQL Server ----" brew install postgresql +brew services start postgresql echo "\n---- Creating the ERPLibre PostgreSQL User ----" sudo su - postgres -c "createuser -s ${EL_USER}" 2> /dev/null || true