This adds a new API for getting lab hours. The plan is to deprecate the old API and replace it with this one. In the meantime there will have to be an "hours" and "hour2".
This API is a bit nicer because it stores the entire hours listing in a single object, and methods on that object work on the entire calendar. This is better than our current system since it makes it easier to cache hours for ocfweb.
This also reads hours from a yaml file (in etc) instead of being part of the library itself. I also used the attrs library for nice validation and conversion from YAML to object types.
This adds a new API for getting lab hours. The plan is to deprecate the old API and replace it with this one. In the meantime there will have to be an "
hours
" and "hour2
".This API is a bit nicer because it stores the entire hours listing in a single object, and methods on that object work on the entire calendar. This is better than our current system since it makes it easier to cache hours for ocfweb.
This also reads hours from a yaml file (in etc) instead of being part of the library itself. I also used the
attrs
library for nice validation and conversion from YAML to object types.