-
Notifications
You must be signed in to change notification settings - Fork 49
Make it work for the new AP 2016 directory structure and prepare for integration with elex #98
Comments
Are you working on this, @anthonyjpesce? I am working on a PR for you. |
Not since we talked, thank you!
|
I just pushed a patch to master that tries to adapt our existing framework to integrate the datestamped result files we haven't used in the past. I suspect something like this will work in a pinch. |
Sorry I'm so behind on this. The world's turned upside down, you know. |
Really? Havnt heard. Off for a swim now. On Tue, Jan 26, 2016, 4:39 AM Jeremy Bowers notifications@github.com
|
Next we'll see if I can substitute in the |
@palewire for president. https://www.youtube.com/watch?v=6v0Q7moYmnI |
elex Race model just slipped in without too much trouble. This is only going to get uglier but it just might be possible. |
…een pastures, he leads me beside quiet waters, he refreshes my soul.
@jeremyjbowers, if I don't survive this battle I'm counting on you to tell my story https://www.youtube.com/watch?v=DEW5p3vGo10 |
If the models line up, the CLI should Just Work(tm). On Tue, Jan 26, 2016 at 4:03 PM, Ben Welsh notifications@github.com wrote:
David Eads | http://recoveredfactory.net "Medical statistics will be our standard of measurement: we will weigh life |
That's my hope. My stopping point for today might be just refactoring them into the existing library here but I agree that theoretically it's possible after that. Though there are some init functions you guys are calling I don't totally understand just yet that might cause an issue. Also, when this is done one of the most important things will be to proof how accurately I've mapped the fields from the FTP to your schema. It's the same data of course, but the CSV headers from the FTP are slightly different and I'm mapping a bunch at once. |
…'t need for Iowa and take another pass at integrating the results file for #98
…mination, we will gain the inevitable triumph.
Okay. I have a basic refactor stuffing all the data in the elex classes. Many things are probably broken, and it isn't even close to integration with your |
Alrighty, after today's AP data test I believe we have squashed the most glaring bugs from my work yesterday. We ran two separate crons, one for the API and one for the FTP, using this simple fork in our download command. if options['ftp']:
logger.debug("Pulling data from FTP")
election = Election(
election_date=date,
username='myuser',
password='mypass',
)
else:
logger.debug("Pulling data from web API")
election = api.Election(
electiondate=date,
testresults=True,
liveresults=False,
is_test=True
) Since python-elections is now returning the same classes as elex, the rest of our code remained 100% the same. Everything worked. Results came out identical (as far as we could tell) in our current front end application. This is probably enough of a hack to get through Iowa and "work" as a fallback. Taking the next step of fully integrating the FTP calls within elex is probably within reach, but I'm reluctant to dive into that refactoring without guidance from @jeremyjbowers and @eads. Do you have any opinions on how our classes here should be merged with your existing code? |
This is fantastic. I'll dig in on this tonight. contact([{ "twitter": "@jeremybowers", "phone": "727-667-0510", "github": " On Wed, Jan 27, 2016 at 1:49 PM, Ben Welsh notifications@github.com wrote:
|
Okay. I am going to shave away a little bit at it today, trying to bring our big class a few baby steps closer to yours, but not matter what we do I think there's probably a difficult merge ahead. |
OMFG it is totally working. |
|
So you merged it somehow? |
Example loader script here: https://github.com/newsdev/elex-ftp-loader |
@palewire Did not try to do the gigantic merge for IA/NH. I'm cool with having this be separate for now. It is a fallback, after all. |
I agree that now is a good time to punt. Should we aim to try to land it for South Carolina? |
I am going to broaden this ticket's name to aim for creating something that is closer to snapping into elex. First off, I'd like to get my tests working again so I'm not flying blind. |
No description provided.
The text was updated successfully, but these errors were encountered: