From b1ddb960c93a22dd17445a80c10475fb98466a02 Mon Sep 17 00:00:00 2001 From: Pierre Narcisi Date: Tue, 26 Mar 2024 14:15:35 +0100 Subject: [PATCH 1/2] feat(CI) add ci for eval perf --- .github/workflows/eval.yml | 137 +++++++++++++++++++++++++++++++++++++ 1 file changed, 137 insertions(+) create mode 100644 .github/workflows/eval.yml diff --git a/.github/workflows/eval.yml b/.github/workflows/eval.yml new file mode 100644 index 0000000000..0089b4061d --- /dev/null +++ b/.github/workflows/eval.yml @@ -0,0 +1,137 @@ +name: Performance Evaluation +on: + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + debian-version: ["11", "12"] + include: + - debian-version: "11" + python-version: "3.9" + postgres-version: "13" + postgis-version: "3.2" + - debian-version: "12" + python-version: "3.11" + postgres-version: "15" + postgis-version: "3.3" + + name: Debian ${{ matrix.debian-version }} + + services: + postgres: + image: postgis/postgis:${{ matrix.postgres-version }}-${{ matrix.postgis-version }} + env: + POSTGRES_DB: geonature2db + POSTGRES_PASSWORD: geonatpasswd + POSTGRES_USER: geonatadmin + ports: + - 5432:5432 + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + + steps: + - uses: actions/checkout@v4 + with: + submodules: true + - name: Add database extensions + run: | + psql -h localhost -U geonatadmin -d geonature2db -f install/assets/db/add_pg_extensions.sql + env: + PGPASSWORD: geonatpasswd + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + cache: "pip" + - name: Install GDAL + run: | + sudo apt update + sudo apt install -y libgdal-dev + - name: Install dependencies + if: github.base_ref == 'master' + run: | + echo 'Installation des requirements de prod' + python -m pip install --upgrade pip + python -m pip install \ + -e ..[tests] \ + -r requirements.txt + working-directory: ./backend + - name: Install dependencies + if: github.base_ref != 'master' + run: | + echo 'Installation des requirements de dev' + python -m pip install --upgrade pip + python -m pip install \ + -e ..[tests] \ + -r requirements-dev.in + working-directory: ./backend + - name: Show database branches and dependencies + run: | + geonature db status --dependencies + env: + GEONATURE_CONFIG_FILE: config/test_config.toml + # - name: Restore database + # run: | + # # wget https://www.dropbox.com/scl/fi/17gsthsftfg59mxwmbbre/export_geonature_10000.zip?rlkey=33choleag4xw60wadm802c3oh&dl=1 -O 10kDump.zip + # # unzip 10kDump.zip + # wget https://www.dropbox.com/scl/fi/jjkxyg120bxc0dp8uy8kq/300KDump.sql?rlkey=tyuk2svitcb9nyshn7r09yo7b&dl=1 -O 300KDump.sql + # ls + # psql -h localhost -U geonatadmin -d geonature2db -f 300KDump.sql + # env: + # PGPASSWORD: geonatpasswd + - name: Install database + run: | + install/03b_populate_db.sh + env: + GEONATURE_CONFIG_FILE: config/test_config.toml + srid_local: 2154 + install_bdc_statuts: true + add_sample_data: true + install_sig_layers: true + install_grid_layer_5: true + install_grid_layer_10: true + install_ref_sensitivity: true + - name: Show database status + run: | + geonature db status + env: + GEONATURE_CONFIG_FILE: config/test_config.toml + + - name: Install core modules backend + run: | + pip install -e contrib/occtax + pip install -e contrib/gn_module_occhab + pip install -e contrib/gn_module_validation + - name: Show database status + run: | + geonature db status + env: + GEONATURE_CONFIG_FILE: config/test_config.toml + - name: Install core modules database + run: | + geonature upgrade-modules-db + env: + GEONATURE_CONFIG_FILE: config/test_config.toml + - name: Show database status + run: | + geonature db status --dependencies + env: + GEONATURE_CONFIG_FILE: config/test_config.toml + - name: Load benchmark stable data + run: | + wget https://geonature.fr/data/benchmark_history/benchmark_stable.json -O benchmark_stable.json + + - name: Compare performance to stable data + run: | + pytest --benchmark-only --benchmark-compare-fail="mean:0.1" --benchmark-compare=benchmark_stable.json + env: + GEONATURE_CONFIG_FILE: config/test_config.toml + # https://stackoverflow.com/a/64126737 For posting results on GitHub Pull Requests From d97e7c2500f9e5f4c5ac0528f69097b18a4606bd Mon Sep 17 00:00:00 2001 From: jbrieuclp Date: Mon, 29 Jul 2024 10:24:51 +0200 Subject: [PATCH 2/2] =?UTF-8?q?accueil=20saisie=20:=20ajout=20du=20nom=20d?= =?UTF-8?q?u=20lieu=20dans=20le=20detail=20du=20relev=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/occtax-map-list/occtax-map-list.component.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/contrib/occtax/frontend/app/occtax-map-list/occtax-map-list.component.html b/contrib/occtax/frontend/app/occtax-map-list/occtax-map-list.component.html index 5fd9d88f11..4181b1ec06 100644 --- a/contrib/occtax/frontend/app/occtax-map-list/occtax-map-list.component.html +++ b/contrib/occtax/frontend/app/occtax-map-list/occtax-map-list.component.html @@ -116,6 +116,10 @@ Saisi par : {{ row?.digitiser?.nom_complet || '-' }} +
+ {{ 'Releve.PlaceName' | translate }} : + {{ row.place_name }} +
Observé par: