nzsilverman / climbing_carpools

University of Michigan Climbing Club Carpool Scheduling Software
GNU General Public License v3.0
2 stars 1 forks source link

Architecture rework #21

Closed rkalnins closed 4 years ago

rkalnins commented 4 years ago

Architecture Rework Notes

Changelog

Added

$ python3 scheduler <list|l>
$ python3 scheduler <clean|c> "<name>"

Changes

Removed

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:

{
    "name": "Jon",
    "email": "js@umich.edu",
    "phone": 1234567890,
    "seats": 4,
    "is_dues_paying": True,
    "is_driver": True,
    "car_type": "Toyota"
    "days": [
        {
            "day": "TUESDAY",
            "departure_times": [6, 7, 8],
            "locations": ["NORTH", "CENTRAL"]
       }
    ]
}

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.