Skip to content

Compatibility with latest MPL 3.8 (Dev) - #433

Closed
cvanelteren wants to merge 6 commits into
proplot-dev:masterfrom
cvanelteren:mpl3.8
Closed

cvanelteren wants to merge 6 commits into
proplot-dev:masterfrom
cvanelteren:mpl3.8

Conversation

@cvanelteren

Copy link
Copy Markdown

Hi,

I really enjoy the interface of proplot! Unfotunately, proplot is not compatible with the latest mpl version. I have edited the source to make it compatible with mpl 3.8 (dev).

Issues were raised in #390.

I don't see any unittests in project other than test_journal.py. Let me know if this PR works for you.
Sincerely,
C

@cvanelteren cvanelteren changed the title colormap fix mpl v3.8 Compatibility with latest MPL 3.8 (Dev) Jul 29, 2023
@lukelbd

lukelbd commented Jul 29, 2023 •

Copy link
Copy Markdown
Collaborator

Hi, thanks for the PR!

Would you mind undoing the changes from single to double quotes? It's a little hard to read your PR right now. Single quotes are the standard I've settled on (I mostly follow black --skip-string-normalization). Also please double check that you're using the latest master branch if you can (I'm seeing conflicts?).

Unfortunately I've already started to work on matplotlib 3.7 compatibility, but haven't started a PR yet. Maybe before you commit much more work to this, could you wait a few days? I have not yet started matplotlib 3.8 testing so I'm sure your PR could help with 3.7-3.8 differences, but some changes could be redundant / there could be initial conflicts. I'd also be happy to add your changes to that PR if that's easier (you'll still be added to the contributors list).

Also please monitor #413 re: tests. I'm planning to add a broad testing suite before the next release. It will include test image comparisons / run tests against an array of different matplotlib versions.

@cvanelteren

Copy link
Copy Markdown
Author

Sounds good!I think I ran black on it indeed before pushing, the single quotes were not intended. The pull was from the latest release (master). I'm not behind my machine right now but will check it when I have the chance.

The biggest issue was figuring out how the cmaps are registered under proplot. Mpl changed it from a dict to a class somewhere above 3.5.

The other issue was concerning the tick formatter. Somehow the function _not_none returned None on minorticklocator.

The rest is pretty much the same. Unittests would be amazing for the future. Happy to hear they are on the way. Keep up the good work.

Cheers! C

@cvanelteren

Copy link
Copy Markdown
Author

I reset the commit @lukelbd. I did a local merge of the tests branch but it generates some errors using pytest (missing decorator definitions). I used the environment.yml listed in PR 413. Let me know if I can assist you in the mpl 3.7 or 3.8 merge.
Best wishes,
C

@riley-brady

Copy link
Copy Markdown

Nudging this, as I am having similar issues.

@cvanelteren it looks like the breaks are due to matplotlib imports in the docs for similar version issues