Skip to content

Use _Backend from matplotlib to simplify the code - #305

Merged
ianhi merged 4 commits into
matplotlib:masterfrom
ianhi:gcf
Mar 18, 2021
Merged

ianhi merged 4 commits into
matplotlib:masterfrom
ianhi:gcf

Conversation

@ianhi

@ianhi ianhi commented Mar 1, 2021

Copy link
Copy Markdown
Collaborator

Follows how the nbagg backend currently handles things: https://github.com/matplotlib/matplotlib/blob/04f78b84a3fda987b4ac65da296d7e4aa764d894/lib/matplotlib/backends/backend_nbagg.py#L225

Conversation with @tacaswell here https://gitter.im/matplotlib/matplotlib?at=603c83fc44f5a454a447c6e9 left me with the impression that it is ok to use the private class.

This ended up being most just updating the code to match nbagg, but my taking the new show function this also fixes: #303

I also created UAT.ipynb for user automated tests. This is helpful for things like the issue in #303 that are important to test as they may break again but don't really make sense as an example.

@ianhi

ianhi commented Mar 1, 2021

Copy link
Copy Markdown
Collaborator Author

Perhaps using _Backend is not optimal see: matplotlib/matplotlib#19605 (comment)

Though I still think it is currently the best solution

@martinRenou

martinRenou commented Mar 2, 2021

Copy link
Copy Markdown
Member

Thanks a lot for your PR!

Do you think we should put UAT.ipynb under a test directory?

@ianhi

ianhi commented Mar 4, 2021

Copy link
Copy Markdown
Collaborator Author

Do you think we should put UAT.ipynb under a test directory?

I ceated a top level test-notebooks directory because it doesn't feel like it would belong in a proper pytest tests directory, but happy to change.

I also moved the pytest settings into pyproject.toml to consolidate files.

@ianhi

ianhi commented Mar 18, 2021

Copy link
Copy Markdown
Collaborator Author

Bump of this @martinRenou and also @tacaswell in case this is something that ipympl really should not be doing?

I think having a UAT notebook is very a nice thing, but we can also swap that into a new PR if need be.

Comment thread .gitignore Outdated

@tacaswell tacaswell left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

modulo my cranky end with a new line suggestion

Co-authored-by: Thomas A Caswell <tcaswell@gmail.com>
@ianhi

ianhi commented Mar 18, 2021

Copy link
Copy Markdown
Collaborator Author

merging so we can add to the UAT in #310

(woops the github ui fooled me. Merging once the tests pass again)

Thanks Tom for the review!

@ianhi

ianhi commented Mar 18, 2021

Copy link
Copy Markdown
Collaborator Author

I think the LGTM has stalled out, and it was green before adding the newline so going for it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ipympl version 0.6.3 is incompatible with matplotlib 3.3.4

3 participants