Skip to content

0.2.1

Latest

Choose a tag to compare

@Kiszkacy Kiszkacy released this 11 Apr 14:33
5f11d7b

Version 0.2.1 is a smaller update bringing few quality-of-life improvements, a fully rewritten autocomplete system, two new commands, and a solid round of bug fixes.

Changes made:

New commands

  • country - changes the country used as the source of public holidays. Days that have already been manually edited by the user are left untouched where unmodified days are updated to reflect the new country's holiday calendar.
  • files - displays the path to the directory where the application stores its data files, config, and other files.

Command changes

  • Modified calendar command - accepts a new optional argument that, when provided, displays a legend explaining the meaning of each color used in the calendar.
  • Modified help command - now alongside other information displays the shortest valid invocation string for the queried command.

Improvements

  • Rewritten autocomplete system - the prediction and autocomplete mechanism has been fully redesigned from scratch. The system now suggests command names, macros, aliases, keywords, command abbreviations, command and macro arguments, and example values for individual arguments.
  • Pressing the down arrow lists all suggestions - pressing the down arrow key when the input is empty now immediately shows all available completions without requiring any characters to be typed first.
  • More detailed info output for months - when info is called in a month context, it now separately reports the number of office days while present and the number of office days while absent, providing a more precise breakdown of attendance.

Bug fixes

  • Command initialization was non-deterministic - the command initialization code relied on a set, which caused the key command to sometimes fail to load entirely and not appear in suggestions or in the help command list. Fixed.
  • Crash when creating an alias with a quoted value - calling alias name "value" caused a crash because quoted strings were being stripped of their delimiters during argument parsing, producing invalid input. Fixed.
  • Alias names with spaces were accepted - it is now enforced that alias names cannot contain spaces.
  • Very long words broke frame borders - words that were too long to fit in one line would not break and caused display frames to overflow. That is no longer a case.
  • checkpoint was slow when listing known checkpoints - listing checkpoints was slow because file metadata (modification date, directory listing) was fetched from the filesystem multiple times. The number of calls was greatly reduced, making it significantly faster.
  • config did not display null fields - when a config field held a null value, attempting to display it caused the command to treat it as non-existent and return an error. It is now correctly shown with its null value.
  • config could not set a field to null - it is now possible to explicitly assign null to a config field through the config command.
  • Incorrect error message when calling exit with dates - providing dates before the exit command produced an error claiming 0 arguments were received while 0 were expected, rather than correctly reporting that the command does not accept dates. Fixed.
  • Macros could silently overwrite other macros - a missing safeguard allowed saving a macro under a name 'macro' or 'deletemacro' without any warning. The necessary protection is now enforced.

Internal

  • Rewrote main.py using argparse - command-line argument handling has been migrated from manual parsing to the standard argparse module.
  • Added __main__.py - the package can now be launched directly via python -m <package_name>.
  • Rewritten config migration tests - the config migration test suite has been corrected and updated.
  • Added E2E tests - a set of basic end-to-end tests has been added, covering the most fundamental application flows.