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

Various enhancements for plot command #217

Merged
merged 6 commits into from
Nov 6, 2024
Merged

Various enhancements for plot command #217

merged 6 commits into from
Nov 6, 2024

Conversation

yarikoptic
Copy link
Member

  • 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
Copy link

codecov bot commented Oct 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.32%. Comparing base (98d7f34) to head (26f4f0e).
Report is 19 commits behind head on main.

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

=== Do not change lines below ===
{
 "chain": [
  "a34a0633e999f95ddfe6710e11f123dbd4b1c5bc"
 ],
 "cmd": "./.update-readme-help.py",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "."
}
^^^ Do not change lines above ^^^
@yarikoptic yarikoptic added the semver-patch Increment the patch version when merged label Nov 4, 2024
@yarikoptic yarikoptic requested a review from asmacdo November 4, 2024 16:14
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.",
Copy link
Member

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?

Copy link
Member Author

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

Copy link
Member

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.

@asmacdo asmacdo merged commit 01c89da into main Nov 6, 2024
14 of 15 checks passed
@asmacdo asmacdo deleted the enh-plot branch November 6, 2024 16:15
Copy link

github-actions bot commented Dec 3, 2024

🚀 PR was released in v0.9.0 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released semver-patch Increment the patch version when merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants