Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
FIX: set_url() without effect in the plot for instances of Tick#9696
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
In the class Tick, the url attribute is not passed to any of the objects that are to be drawn. Suggested solution is to override the set_url() method in Tick to transfer the url attribute content to the tick labels, that are to be drawn.
Why are tests N/A for this? If it had a test, this funtionality wouldn't break in the future... |
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.
Please add the super call to not remove any existing functionality.
Set the url of label1 and label2 | ||
ACCEPTS: str | ||
""" |
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.
Can you also callsuper(self, Tick).set_label(s)
?
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.
Hi Thomas, if you meant to add a call tosuper(Tick, self).set_url(s)
, I just added it, if not, I don't get it, sorry.
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.
Travis is failing with that addition with someImageComparisonFailure: images not close
errors. When calling the parent Artist's set_url() method it just doesself._url = url
! Amazing.
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.
That is what I meant, thanks.
Can you reproduce the failures locally?
How can we add a test for this? Can we parse the XML that is svg well using only our current dependencies to verify that the url is there? |
@tacaswell, I was only thinking a test could be devised to make sure the url was attached to the tick. Whether its embeded or not is another issue. |
anntzer commentedNov 9, 2017 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
For testing one can probably extract the node with the right XPath query (https://docs.python.org/3.6/library/xml.etree.elementtree.html#xpath-support) and do the right assert on it... Or more simply one can just compare the resulting svg with manually setting the url onto the label (tick.label1.set_url(...); tick.label2.set_url(...)); they should be exactly identical. |
I've incorporated this into#17338 and added a test. |
Many thanks,@QuLogic, and sorry, it seems that this fell off my radar at some point :( |
@khyox It fell off ours too 😞 |
PR Summary
In the class Tick, the url attribute is not passed to any of the objects that are to be drawn, so it is useless, as detailed in issue#9695. Suggested solution is to override the
set_url()
method in Tick to transfer the url attribute content to the tick labels, that are to be drawn.Fixes issue#9695.
PR Checklist