Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add progress bar #151

Merged
merged 1 commit into from
Feb 26, 2024
Merged

Add progress bar #151

merged 1 commit into from
Feb 26, 2024

Conversation

Wambere
Copy link
Contributor

@Wambere Wambere commented Feb 26, 2024

Use click progress bar to show progress for csv read and building payload

IMPORTANT: Where possible all PRs must be linked to a Github issue

Fixes #141

Engineer Checklist

  • I have run ./gradlew spotlessApply to check my code follows the project's style guide
  • I have built and run the efsity jar to verify my change fixes the issue and/or does not break the application

@Wambere Wambere changed the title Use click progress bar to show progress for csv read and building pay… Add progress bar Feb 26, 2024
@Wambere
Copy link
Contributor Author

Wambere commented Feb 26, 2024

Example of what this looks like:

  • Without logging
$ python3 main.py --csv_file ~/Downloads/loads/create/done/fifty.csv --resource_type locations
Progress::Reading csv   [####################################]
Progress::Building payload   [####################################]  100%
  • With logging
$ python3 main.py --csv_file ~/Downloads/loads/create/done/fifty.csv --resource_type locations --log_level info
Start time: 17:40:18
Starting csv import...
Reading csv file
Progress::Reading csv   [####################################]
Returning records from csv file
Processing locations
Building request payload
Progress::Building payload   [------------------------------------]    0%       
Progress::Building payload   [------------------------------------]    2%       
Progress::Building payload   [#-----------------------------------]    4%       
Progress::Building payload   [##----------------------------------]    6%       
Progress::Building payload   [##----------------------------------]    8%       
Progress::Building payload   [###---------------------------------]   10%       
Progress::Building payload   [####--------------------------------]   12%       
Progress::Building payload   [#####-------------------------------]   14%       
Progress::Building payload   [#####-------------------------------]   16%       
Progress::Building payload   [######------------------------------]   18%       
Progress::Building payload   [#######-----------------------------]   20%       
Progress::Building payload   [#######-----------------------------]   22%       
Progress::Building payload   [########----------------------------]   24%       
Progress::Building payload   [#########---------------------------]   26%       
Progress::Building payload   [##########--------------------------]   28%       
Progress::Building payload   [##########--------------------------]   30%       
Progress::Building payload   [###########-------------------------]   32%       
Progress::Building payload   [############------------------------]   34%       
Progress::Building payload   [############------------------------]   36%       
Progress::Building payload   [#############-----------------------]   38%       
Progress::Building payload   [##############----------------------]   40%       
Progress::Building payload   [###############---------------------]   42%       
Progress::Building payload   [###############---------------------]   44%       
Progress::Building payload   [################--------------------]   46%       
Progress::Building payload   [#################-------------------]   48%       
Progress::Building payload   [##################------------------]   50%       
Progress::Building payload   [##################------------------]   52%       
Progress::Building payload   [###################-----------------]   54%       
Progress::Building payload   [####################----------------]   56%       
Progress::Building payload   [####################----------------]   57%       
Progress::Building payload   [#####################---------------]   60%       
Progress::Building payload   [######################--------------]   62%       
Progress::Building payload   [#######################-------------]   64%       
Progress::Building payload   [#######################-------------]   66%       
Progress::Building payload   [########################------------]   68%       
Progress::Building payload   [#########################-----------]   70%       
Progress::Building payload   [#########################-----------]   72%       
Progress::Building payload   [##########################----------]   74%       
Progress::Building payload   [###########################---------]   76%       
Progress::Building payload   [############################--------]   78%       
Progress::Building payload   [############################--------]   80%       
Progress::Building payload   [#############################-------]   82%       
Progress::Building payload   [##############################------]   84%       
Progress::Building payload   [##############################------]   86%       
Progress::Building payload   [###############################-----]   88%       
Progress::Building payload   [################################----]   90%       
Progress::Building payload   [#################################---]   92%       
Progress::Building payload   [#################################---]   94%       
Progress::Building payload   [##################################--]   96%       
Progress::Building payload   [###################################-]   98%       
Progress::Building payload   [####################################]  100%
Posting request
Request type: POST
Url: https://fhir.labs.smartregister.org/fhir
Processing complete!
End time: 17:40:21
Total time: 2.712985 seconds

@Wambere Wambere requested a review from pld February 26, 2024 14:42
@pld pld merged commit 3f9c508 into main Feb 26, 2024
4 checks passed
@pld pld deleted the 141-progress-report branch February 26, 2024 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Track and report progress
2 participants