Skip to content

0.10.0 12 March 2025

Choose a tag to compare

@untergeek untergeek released this 12 Mar 16:41
· 14 commits to main since this release

Lots of changed files for this. First experiment using AI-assisted coding.
Lots of good recommendations came from that. Really, really like having AI write my unit tests for me.
Most of the generated tests needed very little tweaking.

Changes

  • Added defaults.py to store default values in a centralized location.
  • Used values from defaults.py in each Class init, both for typing and for value
  • As a way to prevent eternal loops, I added exception count tracking, with max_exceptions configurable at Class instantiation time. The default is 10. Also, while -1 is still supported as a way to keep trying forever, no class defaults to a -1 any longer.
  • Added methods to report (exception_count_msg()) and check (too_many_exceptions()) when the total count of exceptions is exceeded. Raises new exception ExceptionCount when the count is exceeded.
  • Added more exceptions and improved their utility.
    • Added EsWaitFatal which is only raised when ExceptionCount is raised.
    • Added discrete EsWaitTimeout instead of using the builtin TimeoutError.
  • Removed the Index (health) class as it was basically doing the same thing the Health class was doing.
  • Moved health report logging functions to utils.py as they didn't need to be in the Class
  • Moved function prettystr to utils.py as it is a utility function that didn't need to be in the base Class
  • Added a bunch of new unit tests and improved existing ones. First time I think I've ever had full code coverage (only skipping __repr__ and any typing lines) in one of my modules with just unit tests.
  • Updated just about every docstring there was, and added more.
  • Updated docs to include new methods and functions.
  • Bumped elasticsearch8 version dependency to 8.17.1
  • Moved tests/conftest.py to tests/integration/conftest.py and commented every line out (it's unused, as yet)
  • Switched to using f-string formatting in logging.
    • If you want to follow suit, you'll need to update your pylint args accordingly (to prevent warnings).
      • --disable=E1205,W1203
  • Added Python 3.13 support and hatch matrix tests.

I think that's just about it. Hopefully refactoring the other projects that use this module will go smoothly