Version 0.5.0
This version adds more supported patterns, fixes a few bugs and makes the code more pythonic. It is almost fully compatible with the previous one.
Features
- Adds the
datetime.date
of the day inRenderableDay
(available with theperiods_of_day()
method ofHOHRenderer
). - Adds a
SpanOverMidnight
exception, raised when an opening period spans over midnight (e.g.20:00-02:00
), which should be supported in a later version. - Raises a
ParseError
instead of aNotImplementedError
when a field contains an unsupported pattern. - Now supports
SH Mo 10:00-20:00
andJan Mo 10:00-20:00
patterns. - Adds a full support of holidays.
- Removes the
is_parsable()
static method. - Improves the
sanitize()
static method, making it clean more invalid patterns. - Adds a case sanitization for "easter".
Back
- Uses the
LALR
parser instead ofEarley
, the parsing time of 100 fields goes from 2.8 seconds to 0.08. The parser is now stored in a variable at runtime for better performances. - Makes the method which get the opening periods more pythonic and maintainable.
- Fixes a lot of dirty lines of code.
- Adds a config file for Flake8.
- Fixes a few bugs
- Adds a
freeze-dev
Make command. - Adds a
benchmark
Make command. - Removes a useless file.
- Adds more unit tests.