Skip to content

Conversation

ahnsv
Copy link

@ahnsv ahnsv commented Jun 19, 2025

What does the PR do?

Adding tests for plots module and enhance testability (e.g.,, moved tests/test_plot_config -> tests/test_plot/test_plot_config)
Additionally, adding a plot exception (plots/exceptions.py) that extends global exception class and handles plot-wise errors. For now just added EmptyDataError for the sake of shifting left.

Commit Type:

Check the conventional commit type
box here and add the label to the github PR.

  • build
  • ci
  • docs
  • feat
  • fix
  • perf
  • refactor
  • revert
  • style
  • test

Related PRs:

None

Where should the reviewer start?

See tests/test_plots/ directory

Test plan:

Caveats:

Background

I noticed plots/ module has lower test coverage comparing to other modules

==================================================== tests coverage =====================================================
___________________________________ coverage: platform darwin, python 3.13.5-final-0 ____________________________________

Name                                     Stmts   Miss  Cover
------------------------------------------------------------
genai_perf/plots/__init__.py                 0      0   100%
genai_perf/plots/base_plot.py               25     13    48%
genai_perf/plots/box_plot.py                20     12    40%
genai_perf/plots/heat_map.py                26     17    35%
genai_perf/plots/plot_config.py             24      0   100%
genai_perf/plots/plot_config_parser.py      74     37    50%
genai_perf/plots/plot_manager.py            25     14    44%
genai_perf/plots/scatter_plot.py            19     11    42%
------------------------------------------------------------
TOTAL                                      213    104    51%

This PR makes:

==================================================== tests coverage =====================================================
___________________________________ coverage: platform darwin, python 3.13.5-final-0 ____________________________________

Name                                     Stmts   Miss  Cover
------------------------------------------------------------
genai_perf/plots/__init__.py                 0      0   100%
genai_perf/plots/base_plot.py               28      3    89%
genai_perf/plots/box_plot.py                20      0   100%
genai_perf/plots/exceptions.py               5      0   100%
genai_perf/plots/heat_map.py                26      2    92%
genai_perf/plots/plot_config.py             24      0   100%
genai_perf/plots/plot_config_parser.py      74      0   100%
genai_perf/plots/plot_manager.py            25      2    92%
genai_perf/plots/scatter_plot.py            19      0   100%
------------------------------------------------------------
TOTAL                                      221      7    97%

Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)

  • closes GitHub issue: #xxx

@ahnsv
Copy link
Author

ahnsv commented Jul 17, 2025

Can anyone pick this up?

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.

1 participant