Conversation
there are known issues with using tqdm along with some joblib backends. using ThreadPoolExecutor instead.
martinfleis
left a comment
There was a problem hiding this comment.
Hi,
thanks for the PR, though I'd recommend opening an issue to discuss the proposal before opening a fully fledged PR itself. The reason is that I am not super excited about this for two main reasons.
First, this complicates our codebase by a new module and customised parallel processing (rather than one liner using joblib), which adds a maintenance overhead I am not fully comfortably with. As you can see, contextily is currently treaded as a low maintenance project with minimal activity and I'd prefer to keep it that way as there's little to no capacity of the team to maintain the package. For that reason, I'd like to keep the changes minimal.
Second, I am not sure I would want a progress bar to show up by default. Those can be noisy...
A minor note would be on the implementation where we could be more elegant than now but as I said, I am not entirely convinced this PR should go forward.
|
Fair enough, thanks for laying out your concerns. I guess I am not too hung up on this making it into the project, I can keep my branch for my own use. If you think it would be worthwhile to discuss this further, I will be happy to open an issue and move the discussion there. |
This PR adds a progress indicator to the tile fetching. This is especially nice for larger areas/high zoom levels to let the user know that something is happening.
This is implemented by using the
tqdmpackage. There is a newset_progress_barfunction that can be used to override the defaulttqdminstance used, for example when working in a Notebook environment.