From 947f53252abb315e1244ed35f9979ca63b0704ef Mon Sep 17 00:00:00 2001 From: "Phyks (Lucas Verney)" Date: Wed, 14 Jun 2017 16:35:36 +0200 Subject: [PATCH] Explain how to enable new Weboob backends in Flatisfy in CONTRIBUTING.md --- CONTRIBUTING.md | 11 ++++++++++- flatisfy/filters/duplicates.py | 4 +++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3d044d7..ab6a079 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -45,5 +45,14 @@ locale. WIP commits into a single one, to maintain the invariant of "one feature, one commit". - Thanks! + + +## Adding support for a new Weboob backend + +To enable a new Weboob `CapHousing` backend in Flatisfy, you should add it to +the list of available backends in +[flatisfy/fetch.py#L69-70](https://git.phyks.me/Phyks/flatisfy/blob/master/flatisfy/fetch.py#L69-70) +and update the list of `BACKEND_PRECEDENCES` for deduplication in +[flatisfy/filters/duplicates.py#L24-31](https://git.phyks.me/Phyks/flatisfy/blob/master/flatisfy/filters/duplicates.py#L24-31). +Thats' all! diff --git a/flatisfy/filters/duplicates.py b/flatisfy/filters/duplicates.py index 0240c03..971fdc4 100644 --- a/flatisfy/filters/duplicates.py +++ b/flatisfy/filters/duplicates.py @@ -20,7 +20,9 @@ from flatisfy import tools LOGGER = logging.getLogger(__name__) # Some backends give more infos than others. Here is the precedence we want to -# use. +# use. First is most important one, last is the one that will always be +# considered as less trustable if two backends have similar info about a +# housing. BACKENDS_PRECEDENCE = [ "seloger", "pap",