Explain how to enable new Weboob backends in Flatisfy in CONTRIBUTING.md

This commit is contained in:
Lucas Verney 2017-06-14 16:35:36 +02:00
parent 3469035f4a
commit 947f53252a
2 changed files with 13 additions and 2 deletions

View File

@ -45,5 +45,14 @@ locale.
WIP commits into a single one, to maintain the invariant of "one feature, one WIP commits into a single one, to maintain the invariant of "one feature, one
commit". commit".
Thanks! 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!

View File

@ -20,7 +20,9 @@ from flatisfy import tools
LOGGER = logging.getLogger(__name__) LOGGER = logging.getLogger(__name__)
# Some backends give more infos than others. Here is the precedence we want to # 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 = [ BACKENDS_PRECEDENCE = [
"seloger", "seloger",
"pap", "pap",