-
Notifications
You must be signed in to change notification settings - Fork 11
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
Progress bar changes color on completion and failure #397
base: 3.0_develop
Are you sure you want to change the base?
Conversation
…tend into 3.0_develop_cancel
…change the color.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 3.0_develop #397 +/- ##
===============================================
+ Coverage 73.85% 75.19% +1.33%
===============================================
Files 42 30 -12
Lines 2310 1431 -879
===============================================
- Hits 1706 1076 -630
+ Misses 604 355 -249
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
if task.fields.get("bar") == "failure": | ||
self.columns = [ | ||
TextColumn("[progress.description]{task.description}"), | ||
BarColumn(complete_style="rgb(255,0,0)"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this here and different from complete_style="rgb(114,156,31)
above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refactoring DataBinder YAML interfaces
Properly handle transform cancellation. Fix tests
TextColumn("[progress.description]{task.description}"), | ||
BarColumn(), | ||
BarColumn(complete_style="rgb(114,156,31)", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…change the color.
…ontend into progress_bar
Issue
#382
Description
The current progress bar is green through out the process.
Introduced a muted green color for normal process and added a brighter green color when transform bar and download bar finishes all files.
If the transformation fails prematurely, then the bar changes the color to red.
Normal progress:
![image](https://private-user-images.githubusercontent.com/40893179/339044661-79d7ed8e-3506-48ff-8791-442096027a8c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk3NTEwOTUsIm5iZiI6MTcxOTc1MDc5NSwicGF0aCI6Ii80MDg5MzE3OS8zMzkwNDQ2NjEtNzlkN2VkOGUtMzUwNi00OGZmLTg3OTEtNDQyMDk2MDI3YThjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MzAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjMwVDEyMzMxNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTIxNjAyYmMzNThjNWMxZTNmNjBjOWM5YjM3MDMxOTUyMTMxZTEyYmVlYjYzMzIzMDI3YTZmOGVlMzhmNThhNDAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.a93f-yCFUrznjqKWdQXXg42A095ciS8xR9FMoR7bBco)
Completed progress:
![image](https://private-user-images.githubusercontent.com/40893179/339044867-1e4e399c-12d5-4a5b-b9b7-69185decb38c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk3NTEwOTUsIm5iZiI6MTcxOTc1MDc5NSwicGF0aCI6Ii80MDg5MzE3OS8zMzkwNDQ4NjctMWU0ZTM5OWMtMTJkNS00YTViLWI5YjctNjkxODVkZWNiMzhjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MzAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjMwVDEyMzMxNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTJhMTdhMTUxNWY3Y2RjMTc2MGFjYjgxMzJlM2Y5OWM4MzFkMDRlMTgzZTc0YTAzY2VkN2MwNjFhZDFiYTRjYTUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.zu23ukp5Ondod8xwx70dyedHQWyoOixDPkaIZlxdHWI)
Failed Progress:
![image](https://private-user-images.githubusercontent.com/40893179/339044989-57dd14d4-5ace-44d2-9261-8d348721f802.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk3NTEwOTUsIm5iZiI6MTcxOTc1MDc5NSwicGF0aCI6Ii80MDg5MzE3OS8zMzkwNDQ5ODktNTdkZDE0ZDQtNWFjZS00NGQyLTkyNjEtOGQzNDg3MjFmODAyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MzAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjMwVDEyMzMxNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTg5NmIwOWZkZGVjMmVlZjM5MjVmNmFlMTU0MTNhMTlmZGZkZmQwMDJmYjQ0MWY4MTllNzNiY2Y1MDhkMWY5NjUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.6p9HWi0oWHxjL_3hW0YXiinF7YvkanTG4GXrn2HO-xk)
Solution:
Created a custom
TransformStatusProgress
class which inherits theProgress
fromrich.progress
.get_renderables()
function is overloaded to update theBarColumn()
with thered
color in case of failed files.Added an if condition inside the
query.py
'stransform_status_listener
that checks that the transform is complete and if there are any failed files and then call the update method for the progress bar.The update method takes a new keyword argument to indicate if transformation is complete or not.
Added subsequent test cases to test this new
get_renderables()
function and also edited other test cases to with the newTransformStatusProgress
.