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

Remove use of matplotlib's get_offset_position #4372

Merged
merged 1 commit into from
Oct 4, 2023

Conversation

NeilGirdhar
Copy link
Contributor

@NeilGirdhar NeilGirdhar commented Oct 3, 2023

Code PR

  • I have read through the contributing notes and understand the structure of the package. In particular, if my PR modifies code of plotly.graph_objects, my modifications concern the codegen files and not generated files.
  • I have added tests (if submitting a new feature or correcting a bug) or
    modified existing tests.
  • For a new feature, I have added documentation examples in an existing or
    new tutorial notebook (please see the doc checklist as well).
  • I have added a CHANGELOG entry if fixing/changing/adding anything substantial.
  • For a new feature or a change in behaviour, I have updated the relevant docstrings in the code to describe the feature or behaviour (please see the doc checklist as well).

@NeilGirdhar
Copy link
Contributor Author

Fixes #3624 ?

@alexcjohnson
Copy link
Collaborator

Does this restore compatibility all the way up to the current MPL v3.8.0? Kind of remarkable that code written 9 years ago, for MPL v1.3, kept working through two major version bumps but broke on a minor 😅

In addition to my comment above, there are two things we'll want to do before merging:

  • Add a changelog entry (make a new ## UNRELEASED -> ### Fixed section at the top)
  • The test requirements files requirements_*_optional.txt all include MPL v2.2.3 (only 5 years old 🙈) - perhaps we can leave this version in requirements_36_optional.txt to ensure backward compatibility but bump 37, 38, 39, and 39_pandas_2 to the latest supported by each Python version so the existing matplotlylib tests run on the versions new users will get by default. Looks like that's:
    • Py3.7: MPL v3.5.3
    • Py3.8: MPL v3.7.3
    • Py3.9: MPL v3.8.0

@NeilGirdhar
Copy link
Contributor Author

NeilGirdhar commented Oct 4, 2023

@alexcjohnson Done, as requested.

for MPL v1.3, kept working through two major version bumps but broke on a minor 😅

Good question. Maybe it was deprecated and no one noticed?

Thanks for your quick attention to this issue. It totally breaks WandB's use of plots, so it will be awesome to get this in.

@alexcjohnson
Copy link
Collaborator

oh dear, may have opened a can of worms upgrading those dependencies, here's the failure from Py3.9:

The conflict is caused by:
    The user requested numpy==1.20.2
    pandas 1.2.4 depends on numpy>=1.16.5
    xarray 0.17.0 depends on numpy>=1.15
    ipython[all] 7.22.0 depends on numpy>=1.16; extra == "all"
    scipy 1.6.2 depends on numpy<1.23.0 and >=1.16.5
    matplotlib 3.8.0 depends on numpy<2 and >=1.21

Are you able to see these logs @NeilGirdhar? I still think we should make these upgrades, since otherwise our tests are way out-of-date vs what users will actually install today. If you're able to sort these out (along with running black on the new code to fix the code_formatting error) that would be fantastic. If not, I can look into it but might take me a couple of days to get to it.

@NeilGirdhar
Copy link
Contributor Author

Why don't we bump everything to at least NEP 29's defaults?

* Update matplotlib test versions
@NeilGirdhar
Copy link
Contributor Author

@alexcjohnson Is there anything else I should do to polish this off?

Copy link
Collaborator

@alexcjohnson alexcjohnson left a comment

Choose a reason for hiding this comment

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

💃 Nice work @NeilGirdhar! Merging, I expect we'll release this next week with the next plotly.js minor. Thanks!

@alexcjohnson alexcjohnson merged commit e19dec8 into plotly:master Oct 4, 2023
4 checks passed
@NeilGirdhar
Copy link
Contributor Author

Thanks for the quick review process!

@NeilGirdhar
Copy link
Contributor Author

@alexcjohnson Any chance we could get a release soon with this since it breaks WandB?

@alexcjohnson
Copy link
Collaborator

Sorry for the delay @NeilGirdhar - we’re just finishing up a feature in plotly.js and then will make a release. Should be the next couple of days.

@NeilGirdhar
Copy link
Contributor Author

@alexcjohnson No problem at all! Looking forward to the release :)

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.

None yet

2 participants