Conversation
Collaborator
Coverage Report for CI Build 36217611297Coverage remained the same at 90.909%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
david-yz-liu
left a comment
Contributor
There was a problem hiding this comment.
@chiually nice work, I just left one inline comment. Additionally, please update the documentation website (under docs/) to mention this behaviour.
| ) | ||
|
|
||
| # check if default width is used when no width is specified in memory_viz_args | ||
| assert result.stdout.startswith('<svg width="800"') |
Contributor
There was a problem hiding this comment.
The overall idea for testing the correct width is good, but using string matching here is fairly brittle.
Instead, please parse the output as xml (see here) and then assert the top-level svg element has the correct value for its width attribute.
This branch has not been deployed
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.
Proposed Changes
Rather than always hard coding the width to 800 in the MemoryViz CLI command, only include the default width if no width is supplied.
Also made it explicit in the docstring of the
snapshotfunction that the default width is 800 but can be changed usingmemory_viz_args...
Screenshots of your changes (if applicable)
Type of Change
(Write an
Xor a brief description next to the type or types that best describe your changes.)Checklist
(Complete each of the following items for your pull request. Indicate that you have completed an item by changing the
[ ]into a[x]in the raw text, or by clicking on the checkbox in the rendered description on GitHub.)Before opening your pull request:
After opening your pull request:
Questions and Comments
The width of the SVG could always be changed through
memory_viz_argssince the ordering of the command prioritizes the last specified width. This change ensures the command will only ever include one--width(unless the user explicitly puts multiple inmemory_viz_args)