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

Refactor html color #592

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from
Open

Refactor html color #592

wants to merge 4 commits into from

Conversation

sadrasabouri
Copy link
Collaborator

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 to params.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 the color_list.

Any other comments?

Copy link

codecov bot commented Feb 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.75%. Comparing base (3fd038b) to head (a6ddb59).

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.
📢 Have feedback on the report? Share it here.

Copy link
Owner

@sepandhaghighi sepandhaghighi left a 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

@sadrasabouri
Copy link
Collaborator Author

Changelog.md is now updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants