hasadna / hasadna/knesset-data-python
votes html scraper should not fail silently by default
- Langage dominant
- Python
- Étoiles
- 2
- Forks
- 14
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
following PR #3 - it looks like in case an unknown member is encountered it will fail silently
in knesset-data-python we would like to be as low-level as possible and make as little assumptions as possible about how the data will be used
in this case, silently ignoring an error might cause unexpected problems down the line
I prefer that by default we will raise an exception, and add a skip_exceptions parameter which will instead of raising an exception yield the exception object as part of the data stream - to allow the end-user decide how to handle the exception
this is done in the dataservice scrapers, see for example this unit test -
https://github.com/hasadna/knesset-data-python/blob/master/knesset_data/dataservice/tests/base/test_exceptions.py#L38
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Start with the votes HTML scraper and compare its exception handling with the dataservice scraper behavior described in PR #3. Read knesset_data/dataservice/tests/base/test_exceptions.py around line 38, then verify that unknown members raise by default and that skip_exceptions yields the exception object when enabled.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- python
- Domaine
- data-engineering
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100