-
Notifications
You must be signed in to change notification settings - Fork 2
partial update for combining annotation text with images #16
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
base: main
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new themeables to leverage plotnine's theme structure
|
|
||
|
|
||
|
|
||
| def theme_get(): |
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.
extension to the theme_get in plotnine
| return theme_complete(p9.theme_get()) | ||
|
|
||
|
|
||
| def theme_complete(other): |
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.
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