From e795acb5a8881719187dc600603e44b173cffdcd Mon Sep 17 00:00:00 2001 From: SebF Date: Wed, 29 Dec 2021 22:17:34 +0100 Subject: [PATCH] =?UTF-8?q?r=C3=A9organisation=20des=20dossiers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../champs_generiques.json | 0 requetes.json => configuration/requetes.json | 0 traductions.json => configuration/traductions.json | 0 rdoo.py | 4 ++-- {osm_vc63 => rdoopy}/errors.py | 0 {osm_vc63 => rdoopy}/utils.py | 10 ++++++---- 6 files changed, 8 insertions(+), 6 deletions(-) rename champs_generiques.json => configuration/champs_generiques.json (100%) rename requetes.json => configuration/requetes.json (100%) rename traductions.json => configuration/traductions.json (100%) rename {osm_vc63 => rdoopy}/errors.py (100%) rename {osm_vc63 => rdoopy}/utils.py (97%) diff --git a/champs_generiques.json b/configuration/champs_generiques.json similarity index 100% rename from champs_generiques.json rename to configuration/champs_generiques.json diff --git a/requetes.json b/configuration/requetes.json similarity index 100% rename from requetes.json rename to configuration/requetes.json diff --git a/traductions.json b/configuration/traductions.json similarity index 100% rename from traductions.json rename to configuration/traductions.json diff --git a/rdoo.py b/rdoo.py index 1aedd86..bf43f15 100644 --- a/rdoo.py +++ b/rdoo.py @@ -31,8 +31,8 @@ import os import argparse import logging import sys -from osm_vc63 import errors -from osm_vc63.utils import Utils +from rdoopy import errors +from rdoopy.utils import Utils OVERPASS_URL = "http://overpass-api.de/api/interpreter" GEO_API_URL = "https://api-adresse.data.gouv.fr" diff --git a/osm_vc63/errors.py b/rdoopy/errors.py similarity index 100% rename from osm_vc63/errors.py rename to rdoopy/errors.py diff --git a/osm_vc63/utils.py b/rdoopy/utils.py similarity index 97% rename from osm_vc63/utils.py rename to rdoopy/utils.py index 99b3b91..d6bc0d3 100644 --- a/osm_vc63/utils.py +++ b/rdoopy/utils.py @@ -29,7 +29,7 @@ import csv from collections import OrderedDict import requests from pyexcel_ods3 import save_data -from osm_vc63 import errors +from rdoopy import errors class Utils: @@ -44,7 +44,7 @@ class Utils: self.geo_api_url = geo_api_url self.dossier_resultats = dossier_resultats - with open("traductions.json", encoding="utf-8") as trads: + with open("configuration/traductions.json", encoding="utf-8") as trads: self.traductions = json.load(trads) self.lecture_requetes() @@ -271,10 +271,12 @@ class Utils: def lecture_requetes(self): """Lecture des requĂȘtes dans les fichiers de configuration""" - with open("requetes.json", encoding="utf-8") as reqs: + with open("configuration/requetes.json", encoding="utf-8") as reqs: self.json_reqs = json.load(reqs) - with open("champs_generiques.json", encoding="utf-8") as champs_generiques: + with open( + "configuration/champs_generiques.json", encoding="utf-8" + ) as champs_generiques: self.json_champs_generiques = json.load(champs_generiques) for req in self.json_reqs: