-
Notifications
You must be signed in to change notification settings - Fork 2
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
Various enhancements for plot command #217
Conversation
yarikoptic
commented
Oct 29, 2024
- 3729906 - (HEAD -> enh-plot, origin/enh-plot) fix(plot,test): simply point to non-existing file and fixup testing (3 minutes ago) [Yaroslav Halchenko]
- be4e26c - fix(plot): delay import of matplotlib and numpy (15 minutes ago) [Yaroslav Halchenko]
- 37a4034 - feat(plot): do not "hardcode" .png . --output filename should include extension (15 minutes ago) [Yaroslav Halchenko]
- 457e54b - docs: adjust descriptions/help to uniformly end with . and some wording (15 minutes ago) [Yaroslav Halchenko]
… extension matplotlib can save into .svg and others. There is no reason to somehow limit to .png and assume that .png would be added -- just pass entire filename as is to the library.
This way "con-duct --help" has a chance to run without crushing whenever people have installation of con-duct without all optional dependencies
With general mocking of builtins.open test does not test target file absence but could trigger some other problem with some other file opening, as it was happening for me now
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #217 +/- ##
=======================================
Coverage 95.32% 95.32%
=======================================
Files 4 4
Lines 620 620
Branches 68 68
=======================================
Hits 591 591
Misses 15 15
Partials 14 14 ☔ View full report in Codecov by Sentry. |
=== Do not change lines below === { "chain": [ "a34a0633e999f95ddfe6710e11f123dbd4b1c5bc" ], "cmd": "./.update-readme-help.py", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [], "pwd": "." } ^^^ Do not change lines above ^^^
parser_plot.add_argument( | ||
"--output", | ||
help="Output path for the png file. If not passed, show the file but do not save.", | ||
help="Output path for the image file. If not specified, plot will be shown and not saved.", |
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.
How does the user know the file will be png?
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.
he specifies the extension desired. output.png
-- will be .png. output.svg
-- will be .svg
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.
Oh nice, matplotlib is smarter than I realized.
🚀 PR was released in |