freeman-lab/thunder — pull request #71 by industrial-sloth (2014-12-11 21:54:08+00:00)
Title: New imageblocks: simplify blocking strategy creation

This PR folds generating a `SimpleBlockingStrategy` into the `Images.toBlocks()` method call, resolving issue #69.

In so doing, it gets rid of a lot of boilerplate code, as can be seen from the revised unit tests - nice call on that, @freeman-lab.

This currently uses a simple `print` statement to warn if a requested block size exceeds some threshold (set to 500MB at the moment). I'd like to replace that print statement with a sensible use of the `logging` module, but my initial steps in that direction got messy quickly once I started trying to make the logging statements easily configurable, as I think they should be. So currently the `print` is in there as a placeholder - I think setting up some decent and easily-configured logging probably warrants a separate PR. Similarly, it might be nice to expose the max block size before a warning as a configuration property, through an .ini file or similar.