partial update for combining annotation text with images#16
partial update for combining annotation text with images#16benjaminleroy wants to merge 14 commits intomainfrom
Conversation
…ement_text tracking, transfered show and save from base image, missing some tests & functionality, and needs fuller connection to preventative erroring as seen in cow.patch
| else: | ||
| out.append(xi) | ||
| return out | ||
|
|
There was a problem hiding this comment.
roman numeral and alphabet for auto tags
tests/test_base_elements.py
Outdated
| "1/height_scale assoicated with failed plot(s) (v2.2 - 2 plot failed)" | ||
|
|
||
| # global savings and showing and creating ------ | ||
| def test_patch__get_grob_tag_ordering(): |
There was a problem hiding this comment.
new test for the _get_grob_tag_ordering function
tests/test_base_elements.py
Outdated
| "grobs can be passed through the grobs parameter indirectly" | ||
|
|
||
| def test_patch__size_dive(): | ||
| def test_patch__estimate_default_min_desired_size_NoAnnotation(): |
There was a problem hiding this comment.
this is just a different test
| self.__layout = other | ||
| elif inherits(other, annotation): | ||
| raise ValueError("currently not implimented addition with annotation") | ||
| if self.annotation is None: |
There was a problem hiding this comment.
update to take in annotation object internally
| raise ValueError("currently not implimented addition with annotation") | ||
| if self.annotation is None: | ||
| other_copy = copy.deepcopy(other) | ||
| other_copy._clean_up_attributes() |
There was a problem hiding this comment.
the _clean_up_attributes allows special overriding & emptying of values when we add different annotation classes together
src/cowpatch/base_elements.py
Outdated
| def __and__(self, other): | ||
| raise ValueError("currently not implimented &") | ||
|
|
||
| def _get_grob_tag_ordering(self): |
There was a problem hiding this comment.
in patch object as it interacts with the layout and the annotation tag structure
| """ | ||
| pass | ||
|
|
||
| class cow_text(cow_title, cow_subtitle, cow_caption, cow_tag): |
There was a problem hiding this comment.
plotnine themeables have a weird inverse class structure - this indicates that cow_title, etc. inherits from cow_text.
| def __hash__(self): | ||
| return hash(tuple(self.__dict__)) | ||
|
|
||
| class cow_title(themeable): |
There was a problem hiding this comment.
new themeables to leverage plotnine's theme structure
|
|
||
|
|
||
|
|
||
| def theme_get(): |
There was a problem hiding this comment.
extension to the theme_get in plotnine
| return theme_complete(p9.theme_get()) | ||
|
|
||
|
|
||
| def theme_complete(other): |
There was a problem hiding this comment.
a cowpatch theme_completer function for plotnine themes
…cally related to _svg required update
…versus repr testing
…unction name styles
… base not technically complete
…tionality - not complete for doable-size
This doesn't pass
patchtests as we're working on the full update.Has added
plotninethemeattributes forcow_text,cow_title, cow_subtitle,cow_captionandcow_tag`.annotationobject to store things like titles and tag structures