Repository navigation
Generalize ReportCreator to configurable grouping and value columns - #182
Merged
Merged
Conversation
Make ReportCreator plot along any dimension instead of hard-coded network / epsilon_value. Adds keyword-only group_by, value_column and value_label args (defaults preserve existing behaviour), a shared _finalize() helper for consistent axis labels / titles / legends, and docstrings + return annotations. All existing tests pass unchanged.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Aaron99B
approved these changes
Jul 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Let
ReportCreatorplot the robustness distribution along any dimension, instead of being hard-coded tonetwork/epsilon_value.What changed vs. the old
ReportCreator__init__:group_by(thehue/ split),value_column(the plotted value), andvalue_label(axis label). Defaults are"network"/"epsilon_value", so existing call sites behave exactly as before — e.g.group_by="attack"now overlays attacks._finalize()helper. Every figure method previously repeatedget_figure()+plt.close()with no axis labels. Labelling is now centralized: consistent x/y labels, a title, and a legend titled by the grouping column.create_anneplotnow emit readable labels/titles derived from the column names.Testing
tests/test_analysis/test_report_creator.py(all 5) pass unchanged — confirms backward compatibility.ruff checkandruff format --checkclean.