-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: added option for title in the charts #138
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Flags with carried forward coverage won't be shown. Click here to find out more.
🚨 Try these New Features:
|
@@ -71,6 +72,8 @@ def visualize_attributes( | |||
ax[0, 0].grid(False) | |||
ax[0, 0].axis("off") | |||
|
|||
if title is None: | |||
title = f"HSI Attributes of: {rotated_attributes_dataclass.attributes}" |
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.
title is not assigned to anything. Additionally you need to consider if the user passed ax
or None because then we can set title on fig or only on ax
spatial_attributes: HSISpatialAttributes, | ||
ax: Axes | None = None, | ||
use_pyplot: bool = False, | ||
title="Spatial Attributes Visualization", |
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.
Sometimes you assign a default string and sometimes None and set the string in the code. I like when we assign a default string (less code) like here. Make it consistent please
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.
What about the case of the method which is a wrapper around the others? visualize_aggregated_attributes
calls two methods, and if I don't do it with None, then I would need to set the title in the wrapper method explicitly
@@ -107,6 +107,10 @@ def test_visualize_hsi_with_hsi_object(): | |||
# Check if the axes object is returned | |||
assert isinstance(ax, Axes) | |||
|
|||
# Check if title is set |
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.
Add also testing lines for test_attr_visualization
because you missed it with one title.
Contributing to Meteors
Thank you for contributing to Meteors! Please follow the guidelines below to ensure a smooth and efficient contribution process.
PR Checklist
PR Title:
"semantic tag: description"
fix
: A bug fix.feat
: A new feature.docs
: Documentation only changes.style
: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc).refactor
: A code change that neither fixes a bug nor adds a feature.perf
: A code change that improves performance.test
: Adding missing tests or correcting existing tests.chore
: Changes to the build process or auxiliary tools and libraries such as documentation generation.build
: Changes that affect the build system or external dependencies."fix: typo in README.md"
PR Message: Delete this entire checklist and replace it with:
Add tests and docs: If you're adding a new integration, please include
examples
directory.Lint and test: Run
rye run pre-commit run --all-files
andrye test
to ensure your changes pass all checks. See contribution guidelines for more.Related Issue(s): If your PR fixes an issue, please link it in the PR description.
Additional Guidelines
pyproject.toml
files unless required for unit tests.Review Process
If no one reviews your PR within a few days, please
@-mention
one of the maintainers.