Skip to content

Version 0.5.0

Compare
Choose a tag to compare
@rezemika rezemika released this 18 Mar 11:47
· 175 commits to releases since this release

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 in RenderableDay (available with the periods_of_day() method of HOHRenderer).
  • 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 a NotImplementedError when a field contains an unsupported pattern.
  • Now supports SH Mo 10:00-20:00 and Jan 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 of Earley, 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.