Browse Source

extract ipe fetch from main

johan/consolidate-ipe-data
Johan Le Baut 7 months ago
parent
commit
ca58802500
  1. 2
      shell.nix
  2. 3
      webapp/.gitignore
  3. 0
      webapp/ipe_fetcher/__init__.py
  4. 8
      webapp/ipe_fetcher/axione.py
  5. 18
      webapp/ipe_fetcher/model.py

2
shell.nix

@ -4,6 +4,6 @@ pkgs.mkShell { @@ -4,6 +4,6 @@ pkgs.mkShell {
buildInputs = [ pkgs.libspatialite ];
nativeBuildInputs = [ pkgs.sqlite pkgs.cargo pkgs.rustc pkgs.poetry ];
shellHook = ''
LD_LIBRARY_PATH=${pkgs.libspatialite}/lib:LD_LIBRARY_PATH
export LD_LIBRARY_PATH=${pkgs.libspatialite}/lib:$LD_LIBRARY_PATH
'';
}

3
webapp/.gitignore vendored

@ -0,0 +1,3 @@ @@ -0,0 +1,3 @@
__pycache__
/config.ini
.vscode

0
webapp/ipe_fetcher/__init__.py

8
webapp/ipe_fetcher/axione.py

@ -0,0 +1,8 @@ @@ -0,0 +1,8 @@
# const AXIONE_ETAT_DEPLOYE =
# "DEPLOYE"
# const AXIONE_ETAT_DEPLOIEMENT = "EN COURS DE DEPLOIEMENT"
# const AXIONE_ETAT_ABANDONNE = "ABANDONNE"
# const AXIONE_ETAT_CIBLE = "CIBLE"
# const AXIONE_ETAT_SIGNE = "SIGNE"
# const AXIONE_ETAT_RAD_DEPLOIEMENT = "RAD EN COURS DE DEPLOIEMENT"
# const AXIONE_ETAT_RACCORDABLE_DEMANDE = "RACCORDABLE DEMANDE"

18
webapp/ipe_fetcher/model.py

@ -0,0 +1,18 @@ @@ -0,0 +1,18 @@
from typing import TypedDict
class FAIEligibilityState(TypedDict):
FAI: str
isEligible: bool
ftthStatus: str
reasonNotEli :str
class Building(TypedDict):
x: str
y: str
idImm: str
numVoieImm: str
typeVoieImm: str
nomVoieImm: str
AquilenetEligStatus: FAIEligibilityState
AxioneEligStatus: FAIEligibilityState
othersEligStatus: FAIEligibilityState
Loading…
Cancel
Save