-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Stability of layer data attributes #6194
base: main
Are you sure you want to change the base?
Conversation
I cannot figure out why coverage is failing and R CMD check passes. |
I too cannot figure out, but I confirmed this error is reproducible on my local. As it looks too cryptic, maybe we can just ignore the failing tests for now? cf. https://covr.r-lib.org/#exclusions
|
I think I've made some debugging process. I think for some reason,
So this laid bare that I hadn't included scale transformations as preserving attributes, and now this is included :) |
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 please add a test for being able to modify the attribute during computations
…into attr_stability
Merge branch 'main' into attr_stability # Conflicts: # R/layer.R
Added a test. I should note that within the 'layer - panel - group' hierarchy attributes are unstable. So if you want to append some attributes, you should do it at the layer-level. This is because if you do it at e.g. the panel level and one panel returns a different attribute value than another, there is no principled way of merging attributes. |
This PR aims to fix #3175.
It avoids dropping attributes in some places and actively restores them in other places.
Attributes should now be stable from the moment aesthetics are computed up to the
Geom$draw_*()
methods.