Skip to content

Refactorisation : rendre les différents éléments indépendants - #513

Open
jacquesfize wants to merge 38 commits into
developfrom
refact-config
Open

Refactorisation : rendre les différents éléments indépendants#513
jacquesfize wants to merge 38 commits into
developfrom
refact-config

Conversation

@jacquesfize

@jacquesfize jacquesfize commented Oct 21, 2025

Copy link
Copy Markdown
Contributor

Objectif : reprendre les composants "spécifiques" de façon à les rendre indépendants de la class Obj et du service configService.

  • Création d'un nouveau service de gestion de la configuration appelé au niveau des resolveurs des composants de façon à ce que toutes pages est la configuration du module en cours disponible.
  • Création de nouveau composants ne reposant pas sur l'objet Obj.

Backend

  • création d'une route refact config qui évite des traitements au niveau du front

  • correction des configs

  • création d'un MonitoringCruvedSchemaMixin pour retourner le cruved automatiquement

  • routes sites :

    • get_one : reprise de la route
    • post/patch/put
  • routes sites_groups :

    • get_one : reprise de la route
    • post/patch/put
  • routes visites :

    • get_one : reprise de la route
    • post/patch/put
    • get_list
  • routes observations :

    • get_one : reprise de la route
    • get_list
    • post/patch/put
  • routes obs détail

    • get_one
    • get_list
    • post/patch/put
  • routes individus

    • get_one
    • get_list
    • post/patch/put
  • routes marquage

    • get_one
    • get_list
    • post/patch/put
  • tests

    • test des scopes

Frontend

  • Service Config-g
  • Service Permissions
    • Centralisation et nettoyage dans services permissions
    • Virer tout les current_user.cruvedModule et autre cruvedModule
  • Form-g
    • Création d'un composant
    • finir la gestion des boutons
    • gerer les valeur par default
    • bien tester une création
    • fix les geometries
    • navigatetodetail
  • Form-g-sites
  • Properties-g
  • DataTable-g
    • revoir la création des templates
    • simplification des labels
  • SiteGroup component
    • supprimer obj et configservice
  • SiteGroupDetail component
    • supprimer obj et configservice
  • SiteDetail component
    • supprimer obj et configservice
    • utiliser form-g-site

@codecov

codecov Bot commented Oct 21, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.02093% with 40 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.31%. Comparing base (d148f12) to head (78b07e7).
⚠️ Report is 3 commits behind head on develop.

Files with missing lines Patch % Lines
backend/gn_module_monitoring/routes/monitoring.py 18.18% 9 Missing ⚠️
backend/gn_module_monitoring/routes/visit.py 89.47% 6 Missing ⚠️
backend/gn_module_monitoring/monitoring/queries.py 83.33% 5 Missing ⚠️
backend/gn_module_monitoring/routes/obs_detail.py 94.59% 4 Missing ⚠️
...ackend/gn_module_monitoring/routes/observations.py 94.93% 4 Missing ⚠️
backend/gn_module_monitoring/routes/site.py 89.47% 4 Missing ⚠️
...d/gn_module_monitoring/command/imports/protocol.py 72.72% 3 Missing ⚠️
backend/gn_module_monitoring/config/utils.py 88.23% 2 Missing ⚠️
backend/gn_module_monitoring/blueprint.py 96.77% 1 Missing ⚠️
...ackend/gn_module_monitoring/config/repositories.py 97.72% 1 Missing ⚠️
... and 1 more
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #513      +/-   ##
===========================================
- Coverage    80.72%   80.31%   -0.42%     
===========================================
  Files           46       48       +2     
  Lines         3741     4211     +470     
===========================================
+ Hits          3020     3382     +362     
- Misses         721      829     +108     
Flag Coverage Δ
pytest 80.31% <94.02%> (-0.42%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@amandine-sahl amandine-sahl changed the title Refact config Refactorisation : rendre les différents éléments indépendants Oct 24, 2025
@amandine-sahl amandine-sahl added this to the refact milestone Mar 13, 2026
amandine-sahl and others added 13 commits July 20, 2026 15:49
* feat (config, back): now replace config file variable when parsing the protocol config

* feat(config,back): config now merge `generic` and `specific` into `fields`

* create a new route to fetch the new configuration

* modify ci and fix lint

* fix missing variable

* increase test and debug

* fix lint

Create new config service (#514)

Add a Config Resolver launched on every route (#515)

fix config resolver (#517)

Create and use config-g (#516)

* use config-g

* Resolve datatable

* Resolve configServiceG

* Remove configService

* Use configResolver

Process config when loading

fix process config
* Clean permission in datatable -g

* Change permission

* Clean permission

Generic config : Add missing label_list (#521)

Refact Monitoring properties g (#519)

* first version

* now work on site and site group

* debug rebase

* refact + clean + add properties g to module

* fix synthese sync

* fix lint
* Route getOne

* Add getOne sites_group

Lint frontend
* SiteGroup Detail component Remove configServe & obj
* Form map

* Use geojson properties
* POST/PATCH sites_group
jacquesfize and others added 8 commits July 24, 2026 11:25
---------

Co-authored-by: amandine-sahl <amandine.sahl@cevennes-parcnational.fr>
* Fix : refresh datatable on sitegroup component

* Garder le nom des colonnes même sans données
* Form-g resolve propertie formForm

* Visit detail component rename var

* Observation : add routes

* Create observation detail component
* Routes observation add tests
amandine-sahl and others added 6 commits July 24, 2026 17:58
* Clean redondant code

* Clean

* clean endpoints

* Unsuscribe currentEditMode

* currentEditModeSubscription heritage
---------

Co-authored-by: amandine-sahl <amandine.sahl@cevennes-parcnational.fr>
 
---------

Co-authored-by: amandine-sahl <amandine.sahl@cevennes-parcnational.fr>
* Factorisation

* Rename SiteGroupComponent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants