From 7dcaede860f2a65b04b0b905bf85d5819c2cf6d2 Mon Sep 17 00:00:00 2001 From: Jacobe2169 Date: Wed, 11 Oct 2023 10:15:18 +0200 Subject: [PATCH] first comment appearance of app.config.ts + delete command associated with it --- .github/workflows/cypress.yml | 6 ++-- backend/geonature/core/command/main.py | 38 +++++++++++++------------- backend/geonature/utils/command.py | 30 ++++++++++---------- install/05_install_frontend.sh | 2 +- 4 files changed, 38 insertions(+), 38 deletions(-) diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml index 94ce100e14..41bbee9a79 100644 --- a/.github/workflows/cypress.yml +++ b/.github/workflows/cypress.yml @@ -101,9 +101,9 @@ jobs: ./install/05_install_frontend.sh --ci env: GEONATURE_CONFIG_FILE: "${{ github.workspace }}/config/test_config.toml" - - name: Show generated frontend config - run: | - cat ./frontend/src/conf/app.config.ts + # - name: Show generated frontend config + # run: | + # cat ./frontend/src/conf/app.config.ts - name: Install core modules run: | geonature install-gn-module contrib/occtax OCCTAX --build=false diff --git a/backend/geonature/core/command/main.py b/backend/geonature/core/command/main.py index dffd7ad452..c8886d1bbc 100644 --- a/backend/geonature/core/command/main.py +++ b/backend/geonature/core/command/main.py @@ -61,25 +61,25 @@ def dev_back(ctx, host, port): ctx.invoke(run_command, host=host, port=port) -@main.command() -@click.option( - "--input", - "input_file", - type=click.File("r"), -) -@click.option( - "--output", - "output_file", - type=click.File("w"), -) -def generate_frontend_config(input_file, output_file): - """ - Génération des fichiers de configurations pour javascript - """ - create_frontend_config(input_file, output_file) - click.echo( - "Configuration générée. Pensez à rebuilder le frontend pour la production.", err=True - ) +# @main.command() +# @click.option( +# "--input", +# "input_file", +# type=click.File("r"), +# ) +# @click.option( +# "--output", +# "output_file", +# type=click.File("w"), +# ) +# def generate_frontend_config(input_file, output_file): +# """ +# Génération des fichiers de configurations pour javascript +# """ +# create_frontend_config(input_file, output_file) +# click.echo( +# "Configuration générée. Pensez à rebuilder le frontend pour la production.", err=True +# ) @main.command() diff --git a/backend/geonature/utils/command.py b/backend/geonature/utils/command.py index 98b3a15df4..3be2c8e1ae 100644 --- a/backend/geonature/utils/command.py +++ b/backend/geonature/utils/command.py @@ -19,23 +19,23 @@ from geonature.utils.module import get_dist_from_code, get_module_config -def create_frontend_config(input_file=None, output_file=None): - if input_file is None: - input_file = (FRONTEND_DIR / "src/conf/app.config.ts.sample").open("r") - else: - input_file = nullcontext(input_file) - with input_file as f: - template = Template(f.read()) +# def create_frontend_config(input_file=None, output_file=None): +# if input_file is None: +# input_file = (FRONTEND_DIR / "src/conf/app.config.ts.sample").open("r") +# else: +# input_file = nullcontext(input_file) +# with input_file as f: +# template = Template(f.read()) - parameters = json.dumps(config_frontend, indent=True) - app_config_template = template.render(parameters=parameters) +# parameters = json.dumps(config_frontend, indent=True) +# app_config_template = template.render(parameters=parameters) - if output_file is None: - output_file = (FRONTEND_DIR / "src/conf/app.config.ts").open("w") - else: - output_file = nullcontext(output_file) - with output_file as f: - f.write(app_config_template) +# if output_file is None: +# output_file = (FRONTEND_DIR / "src/conf/app.config.ts").open("w") +# else: +# output_file = nullcontext(output_file) +# with output_file as f: +# f.write(app_config_template) def create_frontend_module_config(module_code, output_file=None): diff --git a/install/05_install_frontend.sh b/install/05_install_frontend.sh index 7dced1a0c0..6cfaae4c8d 100755 --- a/install/05_install_frontend.sh +++ b/install/05_install_frontend.sh @@ -71,7 +71,7 @@ cat src/assets/config.json echo "Création de la configuration du frontend depuis 'config/geonature_config.toml'..." # Generate the app.config.ts -geonature generate-frontend-config +# geonature generate-frontend-config echo "Désactivation du venv..." deactivate