-
-
Notifications
You must be signed in to change notification settings - Fork 126
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
Refactor html color #592
base: dev
Are you sure you want to change the base?
Refactor html color #592
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #592 +/- ##
==========================================
+ Coverage 99.69% 99.75% +0.07%
==========================================
Files 14 14
Lines 3183 3165 -18
Branches 433 426 -7
==========================================
- Hits 3173 3157 -16
Misses 4 4
+ Partials 6 4 -2 ☔ View full report in Codecov by Sentry. |
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.
@sadrasabouri Please update CHANGELOG.md
.
- HTML generator engine modified
|
What does this implement/fix? Explain your changes.
This PR refactors the following functions:
html_dataset_type
: the static part of the HTML template is moved toparams.py
. That makes it easier to change and more maintainable. Also, the function is now much shorter.color_check
: nested if statements reduced to one-line statements for easier readability (less indents)html_table_color
: the equations for calculating the background color is now much simpler. A comprehensive list structure is now utilized instead of looping over thecolor_list
.Any other comments?