Simplified day and time handling, updated to a scalable system
Update setup.py for testing, adds nose2. Run in the project directory: $ nose2 to run all tests. Executes all functions prefixed with test
Update README, removed deprecated documentation
Updated read_responses.py to gform_backend.py. Returns data in desired input for generate_rides()
Updated `write_responses.py
Write to output sheet using batch_update() to minimize API calls
Removed
Removed Loc.py
Removed Dept_Time.py
Removed Driver.py
Removed Rider.py
Removed print_responses.py
Removed read_responses.py
Removed write_to_sheet.py
Rider and Driver Data Structure
Riders and drivers will have the same structure but we expect drivers to only have one departure time per day (this is checked, currently warns, should raise an exception). This structure allows us to more easily scale to add more days and times as we can add whatever days and departure times to the corresponding lists as needed.
The dues paying status for drivers is ignored when matching. The seats key is disregarded for riders. car_type is ignored for riders.
Possibly merge this PR, add these as issues, address in different PR? - At this point, we're almost there. Let's get the rough implementation down, merge this PR and then iterate.
[ ] Add config options with command line arguments (see #25)
[ ] Make a decision on matching algorithm
[x] Retrieve google sheets data (see git history for reference)
[x] Publish cars to google sheet (see git history for reference)
[x] Convert google sheets data into required rider and driver input data format (see above)
Architecture Rework Notes
Changelog
Added
nose2
Car.py
.Car
contains a driver and list of ridersAuthorizedClient.py
.AuthorizedClient
is a singleton with the client and their credentialsscheduler
commandChanges
setup.py
for testing, adds nose2. Run in the project directory:$ nose2
to run all tests. Executes all functions prefixed with testread_responses.py
togform_backend.py
. Returns data in desired input forgenerate_rides()
batch_update()
to minimize API callsRemoved
Loc.py
Dept_Time.py
Driver.py
Rider.py
print_responses.py
read_responses.py
write_to_sheet.py
Rider and Driver Data Structure
Riders and drivers will have the same structure but we expect drivers to only have one departure time per day (this is checked, currently warns, should raise an exception). This structure allows us to more easily scale to add more days and times as we can add whatever days and departure times to the corresponding lists as needed.
The dues paying status for drivers is ignored when matching. The
seats
key is disregarded for riders.car_type
is ignored for riders.An example dictionary defining a member:
Todo
Possibly merge this PR, add these as issues, address in different PR? - At this point, we're almost there. Let's get the rough implementation down, merge this PR and then iterate.