Skip to content

Conversation

@2bndy5
Copy link
Contributor

@2bndy5 2bndy5 commented Aug 12, 2022

This now shows a progress bar with percentage completed. I also added the total number of bytes being downloaded (not the number of bytes already downloaded).

@codecov-commenter
Copy link

codecov-commenter commented Aug 12, 2022

Codecov Report

Merging #19 (68a7e75) into main (a4f8c90) will increase coverage by 0.22%.
The diff coverage is 95.45%.

@@            Coverage Diff             @@
##             main      #19      +/-   ##
==========================================
+ Coverage   93.68%   93.91%   +0.22%     
==========================================
  Files           4        4              
  Lines          95      115      +20     
==========================================
+ Hits           89      108      +19     
- Misses          6        7       +1     
Impacted Files Coverage Δ
clang_tools/util.py 91.89% <95.45%> (+3.65%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@2bndy5 2bndy5 linked an issue Aug 12, 2022 that may be closed by this pull request
@shenxianpeng
Copy link
Collaborator

At present

downloading clang-format (version 14)
    |--------------------|100% (of 3349136 bytes)
Installing clang-format-14 to /home/gitpod/.local/bin/
symbolic link /home/gitpod/.local/bin/clang-format already exists. Use '-f' to overwrite. Leaving it as is.
downloading clang-tidy (version 14)
    |--------------------|100% (of 53708200 bytes)
Installing clang-tidy-14 to /home/gitpod/.local/bin/
symbolic link /home/gitpod/.local/bin/clang-tidy already exists. Use '-f' to overwrite. Leaving it as is.

Tried to change it a little bit.

  • Add a space between | and 100%
  • Change - to

New

downloading clang-format (version 9)
    |████████████████████| 100% (of 2578024 bytes)
Installing clang-format-9 to /home/gitpod/.local/bin/
symbolic link /home/gitpod/.local/bin/clang-format already exists. Use '-f' to overwrite. Leaving it as is.
downloading clang-tidy (version 9)
    |████████████████████| 100% (of 32766984 bytes)
Installing clang-tidy-9 to /home/gitpod/.local/bin/
symbolic link /home/gitpod/.local/bin/clang-tidy already exists. Use '-f' to overwrite. Leaving it as is.

@2bndy5
Copy link
Contributor Author

2bndy5 commented Aug 12, 2022

At first I tried using , but the windows runner suffered a unicode error because the ends were and (see this run's log). I like the better. I will stand out from pip and twine which both use .

@2bndy5
Copy link
Contributor Author

2bndy5 commented Aug 12, 2022

I thought about using different colors as foreground and background for the progress bar. Kinda like I did recently for a different project to scan for wireless interference:

@shenxianpeng
Copy link
Collaborator

shenxianpeng commented Aug 13, 2022

I am not a fan of color when it is a simple or non-interactive program.(but I like the yellow color you added during installation). I am also Okay with that If you prefer :)

@2bndy5
Copy link
Contributor Author

2bndy5 commented Aug 13, 2022

We can revisit the color situation later if you want. I'm good with this as it is.

@shenxianpeng
Copy link
Collaborator

You agreed, but maybe you forgot to change it. I'll change it.

@shenxianpeng
Copy link
Collaborator

shenxianpeng commented Aug 13, 2022

seems doesn't work on windows 😢 but it works on my Windows laptop

C:\workspace\clang-tools-pip>clang-tools -i 5
c:\program files\python38 directory is not in your environment variable PATH.
downloading clang-format (version 5)
    |████████████████████| 100% (of 1996800 bytes)
Installing clang-format-5.exe to c:\program files\python38
Don't have permission to install clang-format-5.exe to c:\program files\python38. Try to run with the appropriate permissions.

I will try...

@2bndy5
Copy link
Contributor Author

2bndy5 commented Aug 13, 2022

█ seems doesn't work on windows 😢 but it works on my Windows laptop

I had the same exact experience. 😭 I'm pretty sure there's a better way to use multi-byte characters (wchar in C++).

@2bndy5 2bndy5 merged commit 4b62769 into main Aug 13, 2022
@2bndy5 2bndy5 deleted the add-download-status branch August 13, 2022 04:27
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.

Support download progress bar

4 participants