Closed andymeneely closed 10 years ago
@dani5447 I've written this one up. Want to take this one?
Sure!
Completed the first steps of this endeavor - transferring only the calendar events we care about into a google sheet. I have some comments on that data:
Random event - just ignore it/delete it from our sheets. Looks like a red herring.
As for the dates - yes let's just work with what we have. Maybe they added that rotation partway through.
As for the names, let's process only emails but keep the names in our data in case we ever do start disambiguating by full names. For now, just go with emails and we'll state that limitation.
Alright I'm still working on the loader, but I created a Sheriff model taking care of the first two points in your last section:
That leaves these points still to be done:
I was doing a comparison of the events as listed on the google calendars and as they're downloaded in the excel sheets and I think gcal2excel might have done some sort of automatic conversion from email to a user name where it could find the user.
So to try to fix this, I made a Google Apps Script to get calendar events data and put it in an excel sheet. This way I can make sure that I get the emails. And this bypasses the whole issue I had earlier with the OAuth, because the script is already inside the google drive system!
It seems to work pretty well! I'll do a bit more testing and then put the script in our system and download the new data.
I'll put the script in our Google Drive and copy the script to a .txt file and put it into our files under the "data" folder. It'll be called "SheriffCalendarScraperGAppScript.txt"
In the new data I took the liberty of removing the event descriptions, and only get the attendees (not the 'owner' of the event as the gcal2excel did, because that was just a generic owner)
The old excel sheet, google sheet, and instructions are still in the Google Drive. I can leave them there now for comparison purposes if you guys want to compare the data sheets. (same with the csv files in our github filesystem)
Working on the sheriffs now and just saw that we've been having failing builds. I think it might have something to do with this issue: https://www.ruby-forum.com/topic/64428. It's the closest problem I've found so far and can't figure out why else it's erroring like this.
Now that we have the excel file for the Sherriff Rotation, let's get this data into the database and into our models. Ultimately, I would like to be able to have the following work:
The excel sheet is a little rough around the edges. Let's move it into a Google Spreadsheet with the following things:
Then, download our Google Spreadsheet as a csv and write a
loader
for that csv.@
signOnce we get this data parsing properly, we need:
Sheriff
model. Stores an email, start, end, and titleSheriff
model belongs to a Developer, Participant, and Reviewer.sheriffs
, using proper joining.So it's the full treatment and we'll soon have sheriff data as a first-class citizen in the product. I can help out with this but I'll give you first crack at it.