-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wi p pollingstations refactor #11
base: master
Are you sure you want to change the base?
Conversation
693ffb8
to
d6a29c3
Compare
Our current scraping model deals with all the stations and all the districts, so for now I'm just going to reimplement that here. If there's some advantage to scraping individual stations/districts that can be handled down the line.
d6a29c3
to
e8d89c0
Compare
from lgsf.path_utils import load_scraper, load_council_info | ||
|
||
|
||
class Command(PerCouncilCommandBase): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feels like a large chunk of this file could be refactored in to a common file - it's largely the same as the councillors one, and it would be good to keep the outputs and interfaces as similar as we can I think.
This can be an issue of course, not needed for this PR
from lgsf.polling_stations.scrapers.xml_scrapers import GmlScraper | ||
|
||
|
||
class Scraper(GmlScraper): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW, I think this is really nice and readable. Not convinced that having two classes (PollingScraper
and DistrictsScraper
) would be any easier for a developer to work on. There might be other reasons to have them of course.
52f858f
to
60c43df
Compare
Port of https://github.com/wdiv-scrapers/dc-base-scrapers
Rational is to only have maintain one set of tooling/checks/deployment stuff around scraping 'types of thing' from multiple councils.
We will have to do this quite well for the reps work, so we might as well reap the benefits for polling stations - which neede some love anyway.