Skip to content
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

Use _Backend from matplotlib to simplify the code #305

Merged
merged 4 commits into from
Mar 18, 2021
Merged

Conversation

ianhi
Copy link
Collaborator

@ianhi ianhi commented Mar 1, 2021

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
Copy link
Collaborator Author

ianhi commented Mar 1, 2021

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

Though I still think it is currently the best solution

@martinRenou
Copy link
Member

martinRenou commented Mar 2, 2021

Thanks a lot for your PR!

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

@ianhi
Copy link
Collaborator Author

ianhi commented Mar 4, 2021

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
Copy link
Collaborator Author

ianhi commented Mar 18, 2021

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.

.gitignore Outdated Show resolved Hide resolved
Copy link
Member

@tacaswell tacaswell left a comment

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
Copy link
Collaborator Author

ianhi commented Mar 18, 2021

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
Copy link
Collaborator Author

ianhi commented Mar 18, 2021

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