code-base-investigator icon indicating copy to clipboard operation
code-base-investigator copied to clipboard

Add progress bars to finder.find()

Open Pennycook opened this issue 1 year ago • 0 comments

Parsing each file in the codebase and subsequent preprocessing are the two most time-consuming steps of running codebasin.

Adding progress bars for these steps is expected to be a significant improvement to user experience, as it enables a user to reason about how fast codebasin is running and when it may complete.

Related issues

N/A

Proposed changes

  • Use tqdm to implement a progress bar for parsing all source files. The codebase and platform configuration loops are collapsed because we only parse source files once (even if they are used by multiple platforms).
  • Use tqdm to implement nested progress bars for preprocessing: the outer bar tracks preprocessing for each platform, and the inner bar tracks preprocessing for each source file used by that platform.
  • Add a show_progress option that defaults to False, since other tools (e.g., cbicov?) may wish to run the preprocessor without showing the progress bars.

Pennycook avatar Sep 26 '24 10:09 Pennycook